How to make your AMP pages discoverable in Google search.What you need before implementing a Signed Exchange.How Signed Exchanges work with AMP (and eliminate the URL problem).Why AMP URLs have been cause for concern.In this article, we’ll explain what this means and how you can instantly load AMP from your own domain. But recently, Google rolled a new way to connect your own domain to AMP results. The value is calculated from the time unload event handler on previous page ends to the time load event for the current page is fired.Google’s Accelerated Mobile Pages (AMP) have been speeding up the internet ( and email, too ) for a few years now. Provides the time taken to load the whole page. Total time taken by the server to start sending the response after it starts receiving the request (in ms) Time taken to complete all the redirects before the request for the current page is made (in ms) The duration includes connection handshake time and SOCKS authentication. Provides the time it took for HTTP connection to be set up. The average time (in seconds) spent in DNS lookup for this page For example,, ]įor now, we know which video players are supported and which data we will be able to use in our events, know it's time to know which triggers/interactions we'll be able to track, these are:Īmount of time (in seconds) it took that page to load Represents segments of time the user has watched the video (in JSON format). Indicates the state, which can be one “playing_auto”, “playing_manual”, or “paused”. Specifies the total amount of time the user has watched the video. Specifies the height of the video (in px). Specifies the total duration of the video (in seconds). Specifies the current playback time (in seconds) at the time of trigger. Indicates whether the video began as an autoplay video. If that’s your case, set the default page view to false, and then add a new trigger to fire a page_view event are your own into the init config: There may be a case where you want to personalize the page_view event name, or maybe you need to add some custom parameters to it. To activate this you need to set the “ ENABLE_CONSENT_TRACKING” switch to true, and then a a &gcs parameter will be added to all the hits, containing the actual consent status for the browsing user.īy default a page_view event that will fire on the page load unless you set the DEFAULT_PAGEVIEW_ENABLED to false. If you turn on this feature the current consent status will be reported within the current event hit, allowing Google Analytics to be more GDRP Compliant ( #sigh) and at the same time allowing you to make use of the consent mode modeling when it became available in the future. This will make the tracking compatible with the Google Consent Features. You can have the hits to hold the information about the current consent status. Keep reading this section if you are interested in having a Consent compliance setup in your AMP Pages. This Google Analytics 4 tracking solution for AMP pages, supports the integration with the consent module from AMP and also with Google Consent Mode ( allowing you to attach the consent details to the hits ) If you prefer sending a copy of the hits to some internal database or any other tool, the logic is pretty straightforward so I don't think it needs any explanation just, set your domain there and be sure that you enable an endpoint on the following path " /g/collect" Consent Compliance If you feel it you could buy me some coffees to support my work, this time I'm even hosting a copy of the file myself to ease the work (which depending on the traffic may lead to some costs for me. The good news is that we've got all the needed pieces of information available to perform a fully working tracking with Google Analytics 4, including the session tracking and the needed switched to have the, first_visit, session_start, user_engagment events generated, and as an unexpected extra we'll be able to set event parameters and user properties within our events I'm open to receiving feedback from people that may end up trying this solution, which may not end up being perfect, but still is more than what we actually have. I've been testing everything I could and everything seems to be working fine. That's why I decided to investigate the possibilities of Component and APIs in order to try to build an AMP Native Tracking without needing to draw on some tricky methods like using the infamous iframes. While this may not be an issue for many sites, there're some website types that really need this support (like media sites or magazines). Is the lack of AMP ( Accelerated Mobile Pages) Pages tracking support. One of the most notorious misses on Google Analytics 4.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |