Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

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

jaykwon
Level 3
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
joshd7227840
Correct answer by
Community Advisor
Community Advisor

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
marion33678522
Level 8
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.

marion33678522
Level 8
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 !

joshd7227840
Community Advisor
Community Advisor

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.

joshd7227840
Correct answer by
Community Advisor
Community Advisor

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