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

DTM Page Tags with Angular.js framework

Avatar

Avatar
Validate 1
Level 2
Cleve_Young
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Cleve_Young
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
Cleve_Young
Level 2

15-10-2015

We have an internal site we are tracking, which is a single page which uses Angular.js framework to change views and content. I've set up some code within Angular to fire the s.t() call every time a "page" displays. The s.t() call works as expected for each 'page' rendered by the Angular code. What I'm running into though is on the initial load of the URL, we are getting two s.t() calls:
 1 - A 'generic' call which has no pageName specific data, since that is set within the Angular display code. I'm assuming this is the s.t() triggered by the pageBottom() function. We do not want this as it fires before the Angular code has a chance to build and populate the required values.

2 - The s.t() call fired by the Angular code as it is triggered when that code displays the first 'page' content. This is working as expected and is the call we want.

Once past the initial page load, only a single s.t() call is being made for each new "page". My question is what is the best way to stop the empty call #1 from automatically being sent.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Employee
Ben_Bytheway
Employee

Likes

40 likes

Total Posts

62 posts

Correct Reply

22 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Employee
Ben_Bytheway
Employee

Likes

40 likes

Total Posts

62 posts

Correct Reply

22 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Ben_Bytheway
Employee

15-10-2015

Inside of DTM, you can put

return false;

in the "Customize Page Code" to suppress the beacon from firing for the initial call.  Let me know if that fixes this or not.  🙂

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
Cleve_Young
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 2
Cleve_Young
Level 2

Likes

7 likes

Total Posts

19 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
Affirm 1
View profile
Cleve_Young
Level 2

15-10-2015

Thanks!! Works like a charm. I never thought of putting that within the Tools custom code, I kept thinking of the page load rule.