October 2017
Intermediate to advanced
370 pages
8h 57m
English
This approach will also work if you use Google Tag Manager (GTM) to manage analytics and tracking tags on your main website. There are two extra steps, however. First, in our server script, we need to fetch the GTM configuration (you can cache this on your server too).
Then, once the GTM configuration has been retrieved, we need to perform a string replacement of all instances of "CLIENT_ID" with the "${clientId}" variable that AMP understands, but otherwise the procedure is the same.
You can see the code to achieve this at /ch10/session-stitch-gtm.php. You can follow the same steps as previously to confirm that it's working as expected.
Read now
Unlock full access