Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

Rule is fired but beacon isn't sent

Avatar

Level 4

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) :

Swanan__0-1688978180270.png

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

 

Has anyone come across a similar case?

Thanks

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor and Adobe Champion

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.

View solution in original post

12 Replies

Avatar

Community Advisor and Adobe Champion

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....

Avatar

Level 4

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 !

 

Avatar

Community Advisor and Adobe Champion

If you have 2 rules set to trigger on "BOTTOM", then they will both need conditions...

 

One for condition IS product-dt

The on the main one IS NOT product-dt

 

Or, build some logic into your one rule in the that will make the minor change to accommodate product-dt all within the single rule...

 

If you are using standard prop and eVar set up with Data Elements, then you can use a custom code Data Element that does the product-dt detection... if product-dt then set and return a value, if not, then return "". If you are trying to trigger a custom event, you can add this in your custom code area of your rule:

 

// Add your proper product-dt detection to the if statement
if (product-dt){
   s.events = s.events ? s.events + ",eventX" : "eventX";
   // short form notation... if there is a value in s.events, add ",eventX" to the end of s.events; if nothing in events, you don't need the comma, so just set the value to "eventX" - change eventX to the proper event
}

 

 

It really depends on your complexity and needs, but for minor differences, I always combine them into one main tracking rule (cause if I have to add a new global dimension, the less rules I have to update the less time and testing that needs to be done.

Avatar

Level 4

Great thank you for all the details !!

 

I'll make some test about this in my implementation and let you know // close the subject once it's all good.

 

Best Regards,

Avatar

Community Advisor and Adobe Champion

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.

Avatar

Level 4

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 :

Swanan__0-1689152239039.png

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

Swanan__1-1689152347316.png

 

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.

Avatar

Community Advisor and Adobe Champion

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:

 

Jennifer_Dungan_0-1689168385698.png

 

 

Basically you will see:

Jennifer_Dungan_1-1689168429736.png
when it's unchecked


and

Jennifer_Dungan_2-1689168471760.png
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"

Jennifer_Dungan_3-1689169138326.png

 

Avatar

Level 4

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...

 

 

 

Avatar

Correct answer by
Community Advisor and Adobe Champion

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.

Avatar

Level 4

Hi Jennifer ! 

 

The latest option you shared helps me to fire some beacons! 

For some tests (randomly) I can see the beacon triggered in the dev console and in the Adobe Debugger.
But I still have some beacons that are only visible in the dev console, so I can't receive them properly...

 

Do you have any idea here?

 

Thank's in advance!

 

 

Avatar

Community Advisor and Adobe Champion

It's hard to say without seeing the behaviour of the site..... Most people don't have such an issue.. if the beacon fires, the tracking call can be seen in the debugger and the data appears...

 

I don't know what sort of implementation you have that would cause this not to function normally....

Avatar

Level 4

Indeed... I was expecting that answer... lol

I will deep dive into my implementation to understand what's wrong here.

 

Anyway, it seems to not be a big issue as the data seem to be received in Adobe. I'm just not 100% sure that I'm receiving all the data required.

 

Anyway, thank you for your help on this subject!

Best Regards,