Rule is only fired if 'Send Beacon' is set to s.t() (treat data as a pageview)

Avatar

Avatar

andrease528381

Avatar

andrease528381

andrease528381

18-03-2021

We came across this issue today: We have a rule that is supposed to be triggered by the DOM Ready event together with the condition of finding a specific string in the URL. The only action is 'Set Variables' using custom code. This is followed by 'Send Beacon' and 'Clear Variables'. If we set 'Send Beacon' to s.t() all works fine. But since we want to treat the rule as hit, we would like to use s.tl() instead. However, if we do that, the rule isn't triggered. It was my understanding that this change shouldn't make a difference, but I guess I was wrong. Can someone help me to understand this behavior?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

andrease528381

Avatar

andrease528381

andrease528381

19-03-2021

@evolytics_brian Thanks for your reply! I checked in the Console and the rule is executed, but variables are not set in the case of s.tl(). Maybe the custom code helps with which we try to set the variables:

var path_parts = new URL(document.URL).pathname.split('/')
if (path_parts.length >= 4) 
{
  s.eVar102 = path_parts[path_parts.length - 3];
  s.eVar103 = path_parts[path_parts.length - 2];
}
else
{
  s.eVar102 = "N/A";
  s.eVar103 = "N/A";
}

 

Answers (1)

Answers (1)

Avatar

Avatar

evolytics_brian

MVP

Avatar

evolytics_brian

MVP

evolytics_brian
MVP

18-03-2021

@andrease528381 - Does the rule not execute at all, or does the analytics beacon exist, but without the expected information? Any additional detail you can add would be helpful.