- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
06-20-2018 09:08 AM
Is there a utag variable which shows that this is the first time the page has been viewed for the current session?
Need to know this so that multiple refreshes of a page do not count towards a badge.
Solved! Go to Solution.
06-21-2018 03:07 AM
06-21-2018 06:55 AM
Hello @william1. This sounds more like an AudienceStream question, so I am moving this post to that board. Thank you.
06-21-2018 07:12 AM - edited 06-21-2018 07:12 AM
So when a visitor views a page you score is incremented by 10. We want to ignore duplicate views of the same page from the last 24 hours.
1.view page example.com; the score is incremented by 10; the score is 10.
2.view page example.com within 24 hours of the last view; the score is kept at 10.
3.view page example.com after 24 hours from the last view; the score is incremented by 10; the score is 20.
06-21-2018 08:34 AM
06-25-2018 03:13 AM - edited 06-25-2018 03:13 AM
06-25-2018 08:54 AM - last edited on 07-09-2018 09:47 AM by TealiumJustin
It depends on whether you wish to do this for any number of pages separately (with separate scores), or whether it is a single page (or multiple pages, but a single rule) that contributes to the score. As you've also discussed, it depends on whether you want this based on the current session or on a longer timespan.
I will answer some of the possibilities and let you make the choice
Something to be aware of below is that the rule operator "has changed" is only true if that attribute has changed on the current event.
You may find this article useful if you have not seen the diagram before;
In all cases below, I am using the query string on the page as the key for what makes the page distinct. In your case, it might be the URL itself, or something in the data layer like the page_name.
Single score, this visit
Create a visit level boolean that tracks if the visitor has seen a qualifying page in this visit
The score you can then increment whenever this boolean is true, and has changed. This means they are seening a qualifying page for the first time in this visit
Single score, time window, not necessarily in a single visit
Create a visitor level date that stores the most recent time the visitor has viewed a qualifying page
Create a visitor level number that tracks the change in that date since the last event
The score you can then increment whenever the date is assigned, and has changed, as long as the change in date since the previous event is greater than one day
You need a special case to deal with the first time the visitor sees a qualifying page. In that case, the change in date will come out as exactly zero. If you want to also count that, then you can, as my screenshot shows.
Both of the above deal with a single score, which is what I think you are asking. If you had many such scores, it would be possible to duplicate the logic for each. Alternatively, you might wish to save some effort by taking a different approach.
Multiple Scores, this visit
Create a Set of Strings at the visit level that tracks the keys for the pages the user has seen in this visit
Create a Number at the visit level that is the count of keys the user has seen (the count of items in the Set of Strings)
If this number has changed, then you can increment your score. You would also add a rule to only do this if the page qualifies for this particular score.
Multiple Scores, time window.
This is possible, but I have not tested it.
That approach is geared to giving you a favourite over a time window, but it also gives you a tally over the time window (called the "Master Tally" in that recipe). You store your page URLs in the Tally, and you make the length of the timeline 1 day (which equates to 24 hours, but only with respect to the start of the current visit, I believe)
You could then proceed similar to the "Multiple Scores, this visit" variant above.
07-02-2018 03:18 AM
07-02-2018 03:25 AM - last edited on 07-02-2018 07:49 AM by kathleen_jo
@william1 Sorry about that. I cannot send you a PM with anything attached on here. Maybe a better way is if @kathleen_jo can make that article public.
07-02-2018 07:56 AM
Hi @mark_reddin. Let me work with @TealiumJustin on that document. Hold please...
Copyright All Rights Reserved © 2008-2023