Sep 4, 2018 7:51 AM
From what I've read, enabling AMP will cause some problems with Google Analytics. If a user moves from an AMP page to a non-AMP page, GA will see it as a new session. To fix this, you need to implement "session stitching" by adding some code to your pages.
My question: If you enable AMP on your HubSpot blog, does HubSpot take care of this problem on its own, or will I need to manually set up session stitching?
Sep 4, 2018 9:04 AM
Sep 4, 2018 9:55 AM - edited Sep 7, 2018 4:43 AM
Help other HubSpot searchers find this post quickly by accepting this solution today.
Q: If you enable AMP on your HubSpot blog, does HubSpot take care of this problem on its own, or will I need to manually set up session stitching?
Short A: n/a
If nothing else, we know that all HubSpot blogs are not created equal.
That being said, we confirmed that HubSpot does NOT appear to add the following session stitching code to the <head> section of HubSpot AMP-enabled blog pages by default.
(at least not the blog we tested)
<p><meta name="amp-google-client-id-api" content-"googleanalytics"></p>
Here's the official Google Search Console AMP Test redirection page when testing http://devblog.frankinbound.com/blog/how-to-copy-hubspot-deal-properties-to-contacts-companies using the Google AMP Test.
Here's the official Google Search Console AMP Test for the linked HubSpot AMP page. Notice that the 'amp-google-client-id-api' code is missing.
As you can see, the HubSpot blog pages are LINKED to AMP pages, so not sure if adding the needed code to those AMP pages is even an option.
Always happy to help you build on HubSpot.
Sep 7, 2018 3:21 AM
Still confused on the issue.
Since you have AMP pages enabled, can you verify that if a user visits an AMP page, and then navigates to a non-AMP page on your website, that GA does not consider it 2 sessions?
Sep 7, 2018 4:45 AM - edited Sep 7, 2018 4:46 AM
Sorry, no GA installed on our dev sites. Logic would follow that it should behave precisely as described in the Moz article you cited as the basis for your original question. Now, I'm confused.