Questions tagged [amp-html]

AMP HTML (Accelerated Mobile Pages HTML) is a project to make the web faster as well as easier to develop. It is a set of HTML tags, a JavaScript library, and a cache for AMP-compliant pages.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
10 views

How To Make a Youtube Video in AMP Website Start With Sound

Im making an AMP website and trying to use Auto-played Youtube video in my website, but the video will play muted from the start unless visitor interact with the video. So how to make it start with ...
  • 1
0 votes
1 answer
43 views

How to display reply list using amp-list component

Im writing an AMP email and trying to use amp-list to display a list of replies. I'm having trouble setting the height of the amp-list based on the results returned from my src endpoint (they can be ...
0 votes
0 answers
27 views

3rd Party Iframe support in AMPHTML Ads

Currently any type of 3rd party javascript or iframes are strictly prohibited in AMPHTML ads. Is there any possibility that they will be accessible in the future? Like safeframe support Tried using ...
0 votes
0 answers
67 views

Images are overlapping the header in AMP (CSS problem)

I want to ask you for help with adapting AMP version of website: https://imperiumromanum.pl/en/roman-society/amp/ I am able to make fixed HEADER bar by adding css code nav.amphtml-title { position:...
  • 21
1 vote
0 answers
34 views

How can I view the Amp-State for a given component?

The AMP playground has a nifty tool to look at the Amp-State. Look at the State Tab in the playground: https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fcomponents%2Famp-...
  • 4,326
0 votes
0 answers
47 views

'AMP' is not defined

New to Google AMP pages. Basically, I am trying to access the AMP State to determine whether or not a div should remain hidden: import React from 'react'; const MyButton = (props) => { return ( &...
  • 4,326
0 votes
0 answers
55 views

How to access AMP.state in a React Component

I'm trying to create an AMP compatible component that will show additional content when a button is clicked: import React from 'react'; const MyButton = (props) => { return ( <div> &...
  • 4,326
0 votes
0 answers
53 views

create AMP on Remix

The service we build needs to support google AMP(https://developers.google.com/amp). We know that Next.js has built-in support for AMP, but currently, it seems Remix does not support it. Creating AMP ...
  • 117
0 votes
0 answers
24 views

How to call an exported function in amp-script from another amp-script?

You can export a function in apm-script, it is documented here and here. /** * @param {string} name the name to identify the function by. * @param {Function} function the function to export. */ ...
  • 1,316
2 votes
0 answers
53 views

gmail not posting amp form

I'm making a dynamic email with two forms, the first of which has one button and a hidden field with a predefined value (the stem) that will be posted to the backend and send the OTP of a specific ...
0 votes
1 answer
192 views

Nextjs: how to integrate google analytics in amp pages

i'm wondering how can i integrate amp-analytics with Nextjs project. I saw here that amp-analytics works with GA4 I couldn't find anything regarding amp-analytics and nextjs online. I'm wondering if ...
  • 761
0 votes
0 answers
43 views

instagram script AMP page for nextjs

run instagram and twitter embed inside a Nextjs AMP page application. I have a div like this <div dangerouslySetInnerHTML={{ __html: text }} /> that inside the "text" has a blockquote, ...
-1 votes
1 answer
64 views

How To Disable Browser Back Button In Custom AMP Page?

last time i put this custom disable browser back button (Javascript) in my AMP websites page ( websites ). I use this script to reduce the bounce rate in seo. But after requesting indexing in google ...
0 votes
0 answers
45 views

How to show amp-lightbox by user location (amp-geo)

I am trying to open a modal (popup) with amp-lightbox if the user who enters the page is located in a specific country. I would like to know if this is possible. I have already tried with <amp-geo ...
  • 9
0 votes
0 answers
63 views

how to use css modules in AMP?

Next.js support css modules and hybird AMP mode in box, however, in AMP mode, the css modules seems not working. is there some hint to make css modules working in AMP mode?
  • 1,304
0 votes
0 answers
38 views

create menu in amp-story

I will like create a website with amp-story but I need a menu. I can't create a hamburger menu on top of the story. And amp-mega-menu <header> <amp-mega-menu height="30" ...
0 votes
0 answers
85 views

Form submission failing in AMP Email

I'm sending an AMP Email with a form. When I submit this form, the submit request is being handled by Google and in the response for this request, it gives me an error saying "Request contains an ...
0 votes
0 answers
121 views

Disable anchor ads at the top of your page on amp-auto-ads

Here an instruction https://support.google.com/adsense/answer/7478225?hl=en for non amp pages. I couldn't find anything for amp-auto-ads. Does anyone have experience with this?
  • 5,163
0 votes
0 answers
40 views

Unable To Resolve issue Getting in Next 12 AMP

<amp-list height="277" layout="fixed-height" src="${relatedArticlesUrl}" items="." single-item="." > <div placeholder>Loading ....
0 votes
0 answers
54 views

Duplicated ads displayed in amp-ad with sticky option

I'm facing an issue where <amp-ad> is showing duplicated ads when setting the sticky parameter: <amp-ad sticky="top" width="320" height="50" type="...
0 votes
0 answers
41 views

amp-consent doesn't delete Google Analytics cookie after rejecting consent

I've read that the _ga cookie doensn't fire events after rejecting the consent for analytics. But I noticed that the cookie is not removed from the page. Is that compliant with GDPR? Even if my events ...
0 votes
0 answers
69 views

store values of selected checkboxes in array in google AMP

I want to have an array as state and I want to store values selected checkboxes in that state ... how can I achieve this? Also why e.target.checked is always false even if I select it ? <amp-state ...
1 vote
0 answers
77 views

using amp-list, how to access property outside of items array in JSON response

I am avoiding AMP-script for the purpose of learning to use the web-components well. Using the amp-list component to search OMDb, I get back data with this structure (abbreviated for display): { &...
0 votes
1 answer
211 views

AMP story close button

I would like to add a close button to my AMP stories. I don't want to use amp-story-play if it's possible. I checked the source code and I found a close button, but it's hidden. ... <button class=&...
  • 1
0 votes
0 answers
65 views

Is this amp pages or virus?

I found the following pages on my website /2208242209000/frame.html and I suspect malicious code. But when searching on Google other sites, I find similar sites where AMP technology is used. There is ...
0 votes
0 answers
39 views

Can we customize the sequence of elements in the AMP optimizer?

In case I am using amp optimizer my SEO is saying to put the meta tags before the default css in the generated AMP html.
0 votes
0 answers
89 views

How setup Google AMP to inertiaJs (vue) project?

Errors in the image, css errors (!important), meta custom tag errors (inertia tag), and custom javascript errors. How can I setup?
1 vote
1 answer
136 views

Navigate in amp-script

I have an input select that sets a state "selectedStateId", an amp-autocomplete that sets "selectedCity", and finally an input text as a search bar that sets "inputTerms"....
  • 55
1 vote
0 answers
199 views

AMP custom script / passing dynamic values from php to amp-script

The intention is to add an analytics API script to the AMP version of a set of pages in the website. To do so, I am trying to write a custom AMP script in which I am receiving a dynamic $post_id value ...
  • 154
0 votes
0 answers
52 views

Dynamic Date in Amp pages

I want to display the dynamic date on my page such that it shows exactly one month back date from the current date. I can get the current date by using <amp-date-display datetime="now" ...
0 votes
0 answers
46 views

Amp frame doesn't change height if frame fully visible

I have the next situation. I have frame, inside amp-frame. If amp frame fully visible like on image , after content loaded amp-frame doesn't change height. I call it this way window.parent.postMessage(...
0 votes
0 answers
48 views

Amp-ad on render event. Trying to get any event on render of Ad for ga

How can I check amp-ad render or not? Any event on render of amp-ad? I have tried to find any event on render of amp-ad. So that, I can send ga event on render. Not getting any solution for this. ...
0 votes
0 answers
53 views

Getting an error while using Amp Html Validator package

Facing issue with amphtml-validator v1.0.35 . While using validateString for validating AMP email it is throwing an error. Few months back this was working fine. Getting below error message. Anyone ...
0 votes
0 answers
45 views

AMP Project: Develop safeframe solution

In #amp-html project I'm going to add a possibility to my adserver to deliver ads inside a safeframe. Is there any "ready-to-use" solution in this project? I can see some "safeframe&...
-1 votes
1 answer
106 views

How do I use JavaScript loop and save result in local storage on AMP PAGES

var links = document.getElementsByTagName('a'); for (var i = 0; i < links.length; i++) { if (links[i].href.substr(links[i].href.length - 4) == '.pdf') { linksa1 = links[i].href; ...
0 votes
1 answer
164 views

Get window URL in AMP

I have been trying to use the window.location.search inside my custom javascript to get the page URL in AMP page but I am getting empty field. Is there any way/function by which I can get the page URL?...
0 votes
0 answers
57 views

AMP linked dropdown with pre-selected values

I am trying to get pre selected value in 2 linked dropdowns. To get the linked dropdowns I am using amp-list like described in this example: https://amp.dev/documentation/examples/interactivity-...
  • 1
0 votes
1 answer
68 views

How to render amp-ad with 50% viewport?

Is it possible to configure or implement viewport check and inside amp-ad? Only solution that I could reach was data-loading-strategy="0", but this approach loads ad on 0% ~ 1% viewport...
  • 106
0 votes
1 answer
60 views

How can I click on full height like the green box to go to the next Slide in AMP version (AMP Carousel)

enter image description here I am looking for a way on the Internet and I have not yet found the possibility of moving by pressing up or down the arrow for (AMP Carousel), as shown in the image in ...
0 votes
1 answer
113 views

No adsense show after AMP consent

I use this AMP Consent sample. After the user confirms the consent no Adsense Ads are shown. If the user dismiss the consents, Ads are shown. Is the any settings in the Adsense UI that should ...
  • 1,409
0 votes
0 answers
47 views

AMP expand amp-ad component after click on amp-video-iframe

We use amp component amp-video-iframe to render our player, and would like to render an ad (amp-ad) below a player. That render should happened only after user clicked on player and other conditions ...
  • 8,465
-1 votes
1 answer
204 views

Custom Javascript in AMP stories

Are there any guidelines, tutorials for developers who wants to create custom JavaScript components inside amp stories? Amp documentation shows AMP script is not applicable for amp stories. Simple ...
  • 2,421
0 votes
1 answer
39 views

AMP web development amp-list won't highlight selected option

Please assist me. I am trying to make an AMP dropdown list that opens another list when selected. However, I don't know how to set the css on the outer list button to look active(selected). I don't ...
0 votes
1 answer
93 views

AMP for Email Form Component - Is it possible to redirect user to web page?

When using the AMP for Email form component, is it possible to redirect the user to a web page when one clicks the form submit button within the email?
  • 53
0 votes
0 answers
38 views

AMP flying carpet not loading on the page

This is the following code placed on the site, and looks like its now showing up on the test page. (please ignore the' within the scripts) You can check it on the test page Test page: https://...
0 votes
0 answers
44 views

Implementing and adding captions to images

I would like to have a correction of gallery images in the AMP version of the website: – classic: https://imperiumromanum.pl/en/curiosities/wreck-of-punic-warship-from-marsala/ – mobile AMP: https://...
  • 21
0 votes
1 answer
113 views

Using amp-selector inside amp-carousel

I am trying to render multiple images using amp-selector inside amp-carousel but the images are not loading. If I try to have amp-carousel inside the amp-selector tag then the images are rendering but ...
  • 5
1 vote
1 answer
32 views

AMP get dimensions

How to get dimensions with AMP? In react I can use ref.current.offsetWidth and Heigth, but I don't find a way to get it with AMP. I also tried to use getElementById but every time it's undefined.
0 votes
0 answers
58 views

How to receive post data from amp-form in Gmail

I have integrated forms in AMP email template and post form via Gmail . But it will post in different Google CDN URL . Can anyone advice how to get form post data in AMP template in Gmail ?
  • 3
1 vote
0 answers
49 views

After login with auth0 I need the JWT from a AMP page

I am using AMP google pages technology. For logging in, I am using auth0. What I need to do is after logging I need to access the JWT that comes from the current login and extract an attribute from ...

1
2 3 4 5
47