page load rule

cathyw49544988

02-11-2017

I have a general page load to setup some variables for all pages and I also have another thankyou page load rule to setup additional variables when the thankYou page is loaded. In the general page load rule, I didn't exclude thank you page. If I setup like this, Am I going to double count the page view for thank you page?

Just want to confirm one thing, each time, a page load rule fire, the pageview count will +1? In this case, will thank you page get 2 pageview?  Those a rules should be in the save server call, correct?

Accepted Solutions (1)

Accepted Solutions (1)

ericmatisoff

Employee

06-11-2017

Best practice is definitely #2. This way your 'global' variables are exactly that - global. And any additional 'non-global' variables cascade based on conditions. A lot of customers like to create page type-based rules:

Product Page

Category Page

Home Page

Shopping Cart Page

etc

Those, along with a Global rule, help create a scalable DTM implementation that is easily managed.

Answers (4)

Answers (4)

ericmatisoff

Employee

05-11-2017

I'm not so sure I agree with urs.boller​ here, though I may be misinterpreting the question.

If on a single page (ThankYou.html) you have two rules Page Load Rules fire at Page Bottom, then the variables for both rules will be concatenated into a single s.t( ) or pageview call. For example:

Page Load Rule: Global - Page Bottom: event1 is set.

Page Load Rule: Thank You - Page Bottom: event2 is set.

Once the page loads, both rules will be called, the events will be concatenated into a single call and the *one* pageview will have:

event1,event2 set in s.events.

Make sense?

cathyw49544988

06-11-2017

Thanks Eric. This is very helpful. This is as I expect before. If this is the case, I have two ways to implement the thank you page:

1. Exclude thank you page from global page load rule, and do everything in thank you page load rule

2. Not exclude thank you page in global page load rule and in thankyou page load rule, just do special things for thank you page.

Personally I prefer the second option. From the best practice point of view, which way will be better?

Thanks

ursboller

MVP

05-11-2017

thans ericmatisoff for the help, i‘m sure your‘re right. so basically there‘s no need to put the rules together, it will be done automatically. great to know

ursboller

MVP

02-11-2017

yes, you will get two server calls, one for each page load rule (PLR). and therefore two page views

you have at least two options:

1) turn of the main PLR for the thank you page and add all needed datas to the second PLR

2) cancel the special PLR for the ThankYou page and add needed data as data element to the main PLR. those additional data elements should only return values if the user is on the desired page. this way the data is only added on as desired ...