Here’s the steps:
- Create a Google Tag Manager account. And create a Google Analytics account.
- Admin-> Integrations -> Import your container
- Log into GTM website, select your container, and check its tags. If some are missing repeat the import again. (There should be approx. 7 tags there total).
- Install GTM in your website. (Copy/Paste the head and body codes).
- Enable GTM in your DT. (Scripts -> Checkbox -> Check GTM container).
- Check your GTM configuration (Manage variables). Enter your domain name, and your GA Tracking ID from GA website.
- Log into GTM website again and publish.
- Activate your Decision Tree.
- Get the embed code for your DT and paste it on your website.
- Navigate to your website and open the browser console. Under sources, you should see googletagmanager and google-analytics fire for both your website and your iframe.
The google-analytics sources should both have the same cid.
- One thing to note is that users of your site must have cookies allowed (including 3rd party cookies) in their web browser. If they are blocking any cookies, then the integration wont fire.
- Log into Google Analytics. Click on Audience -> User Explorer -> Be sure to include today’s date in the filter. If you see the data there, your are done!
To install GTM on WordPress, first install the: “Head, footer, and post injections” by Stefano Lissa plugin.