Since we are relying on a CSS selector to trigger the cookie across the entire site, select “All Page Views”.
Once you have defined your trigger, click Save.
Just as a custom HTML tag relies on a trigger to fire, a trigger relies on a variable. A variable defines a value that a trigger needs to check to see if the tag should fire. If you want to learn more about variables, I recommend reading Simo Ahava's Variable Guide.
Select Variables > User Defined Variables > First cambodia number data Cookie. You'll also notice that I named this variable "NumberOfBlogPagesVisited" — you'll want this variable name to match your cookie code.
After selecting “First Party Cookie,” you will now need to enter the name of your cookie. Remember: the cookie name needs to replicate the name you gave your cookie in the code. I named my cookie BlogPagesVisited, so I copied it into the Cookie Name field, as seen below.
Step 4: Create your event tag
When a user triggers a third page view, we'd like to record it and send it to GA. To do this, we need to set up an "event" tag.
First, select Tags > New > Google Analytics - Go to Universal Analytics:
Create your variable
-
- Posts: 325
- Joined: Tue Jan 07, 2025 4:32 am