- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
I have implemented a Facebook Tag that I want to trigger when a user watches three video views, and only fire the first time this happens. I have the '3 video view' restriction in, but how do I make sure that it only triggers once per each visitor?
Solved! Go to Solution.
You could set a cookie value when the 3 video view condition has been met and add an evaluation to the load rule for the cookie value to not be set.
@steve_thurner, thank you I'll give that a shot!
Ideally, I'd like to set this cookie once my tag triggers, but I don't see a clear way to do that.
What's my best course of action?
@andrea_kebalo in you hook code that fires the tag add code to drop the cookie:
document.cookie="videoviews=thirdvideo; expires=Thu, 18 Dec 2013 12:00:00 UTC; path=/";
Then set up videoviews as a cookie parameter in the data layer:
Finally add a load rule like:
This isn't the only solution, but it should work.
Copyright All Rights Reserved © 2008-2023