Tracks the number of page views and stores it in pageviewCount cookie. When the number is greater or equal to 3, fires a trigger. You will still need to assign your own tag to this trigger. Read this blog post for a detailed explanation.
The cookie expires in 30 days, although you can easily modify the script in cHTML – Set Cookie – Pageview Counter tag.
INSTRUCTIONS
- Download Container File
Download the container JSON file (right-click on the link and click “Save Link As” or “Save Target As” to save the JSON file to your computer). - Import JSON File into GTM
Log into your own Google Tag Manager container and head to the Admin section of the site. Under Container options, select Import Container. Read this blog post for more details about importing a container file. - Assign any tag you want to the Window Loaded – 3rd Page View trigger
Keep in mind that this GTM recipe sets a cookie and creates a trigger only. You’ll have to create some kind of tag manually. Few examples: email pop-up tag, remarketing tag, etc. - Preview & Publish
Use the Preview options to test this container on your own site. Try testing each of the events to make sure they’re working properly. If everything looks good, go ahead and publish! - Optional. Modify cookie expiration
By default, the cookie expires in 30 days. If you wish to change the expiration period, replace number 30 (at the end of the cHTML – Set Cookie – Pageview Counter script)
- Optional. modify the number of page views
By default, the trigger in this Google Tag Manager recipe fires on 3rd page view, but you can edit the number in Window Loaded – 3rd Page View trigger.
View all 30+ Google Tag Manager Recipes