Rule is fired but beacon isn't sent | Community
Skip to main content
Level 4
July 10, 2023
Solved

Rule is fired but beacon isn't sent

  • July 10, 2023
  • 1 reply
  • 3529 views

Hi Community,

 

For a specific page template on my website, I have 2 rules sending beacon (s.t()).

The first rule is the generic one (rule name : "BOTTOM") which sends a pageview event on every page of my website.

 

I'm struggling with my second rule dedicated to this specific page template (rule name : "Product-dt").

It's a basic rule as it's waiting "Page BOTTOM" event with a condition on a specific page template of my website.

I added 2 actions : Adobe Analytics - Set Variables wait, then Adobe Analytics - Send Beacon (s.t())

 

The problem is that when I'm testing my rule, I can see only one beacon fired (I assume it's the one coming from my BOTTOM generic rule) :

My rule product-dt is fired but it seems that it doesn't send a beacon.

 

Has anyone come across a similar case?

Thanks

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

Yes it's part of my product-dt rule.

 

I juste made the change and tested it, but it doesn't seem to help... 

I am seeing beacon fired in my JS Console, but when I want to check in Adobe Platform Debugger, it's like nothing happened...

 

 

 


Ok, let's try the "heavy handed" approach...

 

Remove the Send Beacon action completely

 

Go into your Set Variables action, open Custom Code (if you have any custom code here, you need to add this to the end), and add:

 

s.t();

 

Basically, we are trying to ensure that everything in your Set Variables is finished before the beacon is set.. if this works, I suggest renaming you action to something like "Adobe Analytics - Set Variables and Send Beacon" so that you remember why you don't have a "Send Beacon" in the rule...

 

I had to do this on some of my implementations due to timing issues.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
July 10, 2023

No, generally the issue is trying to prevent multiple s.t calls from being made for the same page... but given your description, you are expecting to track the same page twice?

 

This is bad... you don't want to artificially inflate your Page Views by tracking the same page twice.

 

If the rule "fires" then unless you have a JS error happening in your rule, the full rule will run. So if you aren't seeing the beacon, I assume that your rule triggers (which is why the debug shows it) then something is failing inside it resulting in not getting the beacon...

 

But again, I cannot stress enough how bad for your overall analytic health firing two s.tl calls is....

Swanan_Author
Level 4
July 11, 2023

Hi Jennifer, 

 

Thank you for your help on subject ! 

Well no I'm not expecting to track 2 pageviews... I didn't think about that before asking the community lol.

Indeed this is a bad practice and that's not what I want, for sure !

 

So I should prevent my rule "BOTTOM" from triggering on my page and only have my rule "product-dt  to be triggered and that should solve my issue ? 

 

Thank's again for your help !

 

Swanan_Author
Level 4
July 12, 2023

Possibly because the beacon appears to be firing before your rule... is your beacon in a separate rule? Or part of your product-dt rule?

 

If it's separate, this can be hard to control a proper order of operation...

 

If it's part of the product-dt rule, you may need to change the rule sequencing to "Wait, Then" rather than just "Then" as there is some delay in the initial items that isn't completing before the Beacon is sent....

 

If option 2, the sequencing fix is easy, make sure this checkbox in the advanced options of each action:

 

 

 

Basically you will see:


when it's unchecked


and


When it's checked

 

 

If you don't have that option, you will need to adjust the Property settings (depending on how old your Property is, this feature didn't originally exist), but on the Property configuration, in the advanced settings, there is an option to "Run rule components in sequence"

 


Yes it's part of my product-dt rule.

 

I juste made the change and tested it, but it doesn't seem to help... 

I am seeing beacon fired in my JS Console, but when I want to check in Adobe Platform Debugger, it's like nothing happened...