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.
2,305
questions
1
vote
0
answers
29
views
vast / vpaid video can run amp-video ads?
how can I use the vast / vpaid tag advertisement with the amp-video tag or AMP ads?
I have creted amp story with normal mp4 video by now want to run this with vast Tag
<!DOCTYPE html>
<html ...
0
votes
0
answers
52
views
Amp pages disappear in Google searches
I use amp pages on my website and it passes the amp tests with flying colors. Even when mobile users click on the results, they go to the amp version. But sometimes it does not go to the amp version, ...
0
votes
0
answers
45
views
what is minimum duration requirement for amp-video in amp-story?
Searching on https://amp.dev/documentation/guides-and-tutorials/develop/story_ads_best_practices#video, the documentation only talks about upper limit of video file size.
Are there any limits on the ...
0
votes
0
answers
46
views
I don't need Hubspot HUBL variables {{ standard_header_includes }}, how can I skip this requirement for AMP Page?
I created a template in Hubspot to publish a WebStorie using AMP. I put the code from scratch and Hubspot show me that I must to insert the variables {{ standard_header_includes }} and {{...
0
votes
1
answer
50
views
how to set limit of visible elements with show more button in <amp-list>?
how should i use <amp-list> to parse json file but show limit number of elements of it on page, so that i can set up a show more button to load more elements? i use it to make a block with ...
0
votes
0
answers
60
views
AMP-Analytics and AdSense Triggers for GA4 Integration
As far as I understand, the way the GA4-AdSense integration works is in a way where AdSense push events such as ad_impression, ad_click to ga4 directly from the visitor's browser (together with ...
0
votes
0
answers
16
views
Are Container Queries supported on AMP?
I don't find documentation ruling out the use of Container Queries on AMP, but by using the AMP for Wordpress plugin, they are somehow filtered out of the amp-custom css tag, e.g.:
.parent {
...
...
0
votes
1
answer
59
views
How to make an exception for a template not to load on AMP in wordpress?
I have my web page full on AMP using too the oficial plugin. I use templates for my content, the template is used everytime someone makes a post. All the page is in AMP but if I want that just one ...
0
votes
1
answer
110
views
How to play a hidden AMP-Audio on AMP-Image click on an AMP-HTML page (Full Page Example)?
How would you play a hidden audio file, presumably via an AMP-Audio (<amp-audio></amp-audio>) component on a page element click, specifically an AMP Image (<amp-img></amp-img>) ...
0
votes
0
answers
62
views
Bulk AMP emails in AWS SES
As I have to send AMP emails in bulk, I am able to do it by creating a template for normal HTML emails in NodeJs. However, when I attempt to do it with the AMP createEmailTemplate function, it will ...
0
votes
1
answer
79
views
Local AMP HTML development on local server with address 192.168.x
I have a local web server sitting on 192.168.0.10
My AMP page looks like this:
<!DOCTYPE html>
<html amp lang="en">
<head>
<script async src="https://cdn.ampproject....
0
votes
1
answer
50
views
How to define attributes like font-size, padding for mobile version in AMP for email?
I tried to use media query to make the AMP email responsive, but looks like it isn't supported in AMP. However, I found out media="(max-width: 599px)" and media="(min-width: 600px)"...
0
votes
0
answers
50
views
How to correctly use the <amp-ad-custom> tag to display custom ads in AMP?
I recently came across the amp-ad-custom format. But there is not much documentation. If I understand correctly, the amp-ad-custom tag can be used to manage a custom ad network on a website, ...
0
votes
0
answers
33
views
Add title for amp-consent banner in iframe
How can I add the Title for the amp-cosent iframe banner for accessibility?
Lighthouse shows me the it needed for accessibility.
0
votes
0
answers
60
views
How could I set no-cors on amp-script?
Error that I get when I use amp-script:
Access to fetch at 'amp script src' from origin 'amp site' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested ...
0
votes
0
answers
77
views
We are passing AuthorizationUrl inside <script type="application/json" id="amp-subscriptions"> but the api call is not being made
This is the script tag inside which I am passing a JSON object with all the required fields. I am expecting an api call to be made to https://pub.com/amp-authorisation?rid=READER_ID&url=SOURCE_URL....
0
votes
0
answers
84
views
Trying to convert individual components into AMP rather than all components on page in Next.js
I'm trying to run this page as an AMP on '/' route but I only want to run the Article component as AMP. The three components are rendered conditionally based on viewType.
export const config = { amp: ...
0
votes
0
answers
106
views
Upload AMPHTML to Google Ads error INVALID_BUNDLE: AMP
thanks in advance for helping.
I searched around for topics on uploading AMPHTML ad to Google. Can seem to get pass the INVALID_BUNDLE: AMP error in Google Validator.
How can we get our AMPHTML ...
0
votes
0
answers
38
views
amp-list fallback only loading on page resize
I have the following amp-list in an AMP mail I'm working on.
I set the amp-list src to an endpoint that doesnt exist in order to see the fallback.
The issue is that the fallback is not being rendered ...
0
votes
0
answers
76
views
Alternate page containing the canonical page tag on ghost with amp enabled
I have blog on ghost with enabled AMP - Google Accelerated Mobile Pages.
On page: https://preciselab.io/json-merge-patch I see
<link rel="canonical" href="https://preciselab.io/...
0
votes
1
answer
71
views
Can I persist the state of user input to AMP form upon email reload?
Say I have an AMP form embedded within a dynamic gmail. Is there a way to persist the state and show what the users inputted upon reload of the email without utilizing an amp-list component fetching ...
0
votes
1
answer
151
views
Adding FontAwesome to style amp-custom
I am trying to put the source code for FontAwesome:
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css">
in section ...
-1
votes
1
answer
71
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 ...
0
votes
1
answer
134
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
62
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
126
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:...
1
vote
0
answers
69
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-...
0
votes
0
answers
131
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 (
&...
0
votes
0
answers
138
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>
&...
1
vote
0
answers
128
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 ...
0
votes
0
answers
55
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
vote
0
answers
91
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
430
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 ...
0
votes
0
answers
120
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
98
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
62
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 ...
1
vote
1
answer
203
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?
1
vote
0
answers
51
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 ....
1
vote
0
answers
115
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
500
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
vote
1
answer
258
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"....
1
vote
0
answers
262
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 ...
1
vote
0
answers
60
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
133
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
314
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
1
answer
74
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...
0
votes
1
answer
69
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
176
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
votes
1
answer
343
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 ...
0
votes
1
answer
51
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 ...