Adobe Launch Time on page event

Avatar

Avatar
Applaud 5
Level 1
winstonl3651471
Level 1

Likes

0 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Applaud 5
Validate 1
Affirm 1
View profile

Avatar
Applaud 5
Level 1
winstonl3651471
Level 1

Likes

0 likes

Total Posts

29 posts

Correct reply

1 solution
Top badges earned
Applaud 5
Validate 1
Affirm 1
View profile
winstonl3651471
Level 1

21-06-2021

Hi,

I want to fire a tag in Adobe Launch based on time spent on the page. I know we can use the Time On Page Event type to do this. But, if I want the tag to fire on after different times on certain pages, can it be done via one rule or do I have to create multiple rules?

Eg. Page 1 - www.abc.com - fire tag after 10 seconds

      Page 2 - www.xyz.com - fire tag after 15 seconds

Do I need to create two different rules in Adobe Launch or Can it be done in one rule? if so, how?

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Seeker
Level 3
jkm-disco
Level 3

Likes

24 likes

Total Posts

130 posts

Correct reply

15 solutions
Top badges earned
Seeker
Contributor
Shape 1
Give Back
Affirm 10
View profile

Avatar
Seeker
Level 3
jkm-disco
Level 3

Likes

24 likes

Total Posts

130 posts

Correct reply

15 solutions
Top badges earned
Seeker
Contributor
Shape 1
Give Back
Affirm 10
View profile
jkm-disco
Level 3

22-06-2021

Hi @winstonl3651471 ,

 

Though you can use the same rule for both pages, there are two issues you will have: First, someplace you will need conditional logic to distinguish which page you are on. Second, it will be difficult to determine which event happened the 10 second event of the 15 second event.

jkmdisco_0-1624365932477.png

The easiest way to do this without custom code is setting up to separate rules. However, if you did want to use a single rule, you could write custom code using the same mechanism as the Time and Scroll Event extension which is the setTimeout() function. One approach would look like the following:

  • Create a new rule which fires conditionally on the pages that you are doing timed tracking
  • Within an Analytics "Set Variable" action write custom code similar to 

 

// time logic
var time;
if (isPage1) {
  time = 10;
} else if (isPage2) {
  time = 15;
} else { return; }

// fire beacon logic
setTimeout ( function() {
  // any additional logic
  s.t(); // or s.tl()
  }
  , time * 1000
);​