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

You're welcome, and if you have any specific questions for how to combine the various logic into one rule, using Custom Code Data Elements or the Custom Code area of the rule, just let me know!

 

I use these rules a lot, as I have a big complex implementation, and I use code like this regularly to keep my rules streamlined.


Hi Jennifer, 

 

I hope you're doing well,

I did some tests, and I coming back to you regarding this subject. 

I made a mistake when I explain my problem. In fact my "BOTTOM" rule isn't a problem, it doesn't send pageview anymore.

The only rule sending a beacon on my "product-dt" environment is my rule "product-dt".

 

So the situation : 

- In my console, I can see that my rule "product-dt" is fired.

- Still in my console, I can see a beacon being sent to adobe analytics.

- In Adobe Platform Debugger, I can't see any page view hit.

 

Here is a screenshot from my console :

Here is a screenshot from Adobe Platform Debugger for the same pageview :

 

So how can I see a beacon fired in my console but not in Adobe Platform Debugger ? 

Do you have any idea about this ?

 

Thank you in advance for your help and sorry for the confusion.