Expand my Community achievements bar.

SOLVED

How to make a page load rule only firing on a landing page

Avatar

Level 3

Hi. Like the title, I am wondering if there is a way to make a page load rule that fires only on a landing page. I knwo for a fact that dtm had 'landing page' condition, but is there a specific way to make this to fire on when visitors entered on our website? I tried to make a rule with 'landing page' = \S (with regex) but i don't think this works.

And plus, when I add a conversion tracking source (Google Adwords) on a landing page, is it okay to make the source fire on all pages?

If anyone has an answer, please let me know.

Thank you.

1 Accepted Solution

Avatar

Correct answer by
Level 9

To create a Page Load Rule that only triggers on first page view of a session, you can use Engagement: Page Views.

Under Conditions > Rule Conditions > Criteria, choose Engagement: Page Views.

Set User has had "equal to"  1  page views, and select Current Session.

chrome_2017-11-14_14-56-33 - Copy.png

.josh

View solution in original post

4 Replies

Avatar

Level 8

Hello !

You could use a page load rule without any conditions, so it fires every time , and in the custom code try doing a if condition on a cookie that would be something like this :

If ( cookie 'landing page' exists ){ do nothing }
else {
     create cookie 'landing page' with 0 expiration  ; // 0 expiration is a session.
     do someting;
}


This should work ! well , not like this, on proper java script. DTM has already cookie methods ( creat, write, read, erase) but i don't remmeber these.

Cheers !

M.

Avatar

Level 8

Maybe the name of my cookie is not the most explicit. The cookie is just a token to see if it's or it's not the landing page. Think 'NOT landing page'. Sorry !

Avatar

Level 9

Custom cookie based logic one way to go, yes.  But instead of letting the rule fire every time with no condition, would be better to place this logic as a Data:Custom condition.

Avatar

Correct answer by
Level 9

To create a Page Load Rule that only triggers on first page view of a session, you can use Engagement: Page Views.

Under Conditions > Rule Conditions > Criteria, choose Engagement: Page Views.

Set User has had "equal to"  1  page views, and select Current Session.

chrome_2017-11-14_14-56-33 - Copy.png

.josh