Error : [Adobe Analytics] Cannot send beacon: TypeError: Cannot read property 'indexOf' of undefined

sailakumarip633

03-12-2018

I am trying to configure adobe analytics on new site using launch  .

1. Added Launch js file

2. Added datalayer

3. Configured adobe analytics extension in launch

4. Created rule to send beacon on launch

I am seeing below error . Its a third party site and has S-code already on the pages for their tracking not sure if the inline S-code is causing adobe launch not firing the adobe beacon.

Any help would be appreciated.

Error:

1638274_pastedImage_0.png

Answers (8)

Answers (8)

gflare

06-12-2018

This kind of error can occur from an incompatibility with prototype.js and the Analytics Extension & Deployment within Launch.  If someone can chime in and say why there incompatibility exists, that'd be great - I have not been able to identify where the issue is other than the fact that some prototype.js versions cause problems on some sites.  (I have not confirmed that using the latest prototype.js fixes all issues or not, so that's an open question as well)

It looks like you've got prototype.js included, so as a first step I would try to update or remove that.  Using requestly, I was able to block prototype.js from loading, and your Launch implementation was able to successfully complete all actions and send the Analytics beacon.

StewSchilling

MVP

04-12-2018

I see that you have cookie Domain Periods and First Party Domain Periods set to "3" in the configuration of your Adobe Analytics Extension.  That does not match up with this hostname.  Try removing those settings.

Screen Shot 2018-12-04 at 9.38.13 PM.png

sailakumarip633

04-12-2018

Thank you all for response.

I tried sending variables before beacon, didn't work

I also tested giving test values to variables, didn't work.

I tried same js code on other test page and i am seeing adobe beacon firing.

adria_a94067176

04-12-2018

Without seeing your code it's difficult to know.

But it seems you have an undefined variable to send.

Before sending the beacon you could put a console.log(yourVariable) to look if it's defined, if it's not defined, define it by the following:

let yourVariable = 'thingYouWantToSend';

StewSchilling

MVP

03-12-2018

Oh. I see.  You ARE loading AppMeasurement 2.10.0 via Launch. 

But the site loads its own (old crusty version) from http://www.cvent.com/g/scripts/prod/s_code.js

ALTHOUGH this seems like a likely suspect (and I would still pursue getting rid of the old stuff) it probably isn't the root cause.

Try adding an AA Set Variables action in the same rule (just before the send beacon action).

In the set variables action, just set any variable you like (prop99 = "foo" or something like that).

I wonder if this might make the Launch AA extension happier...  

StewSchilling

MVP

03-12-2018

I got this far by loading the un-minified Launch embed on your site.  The issue is coming from a call to a function by the name "onlyUnique" which is called when preparing s.linkTrackVars prior to sending the beacon.

Screen Shot 2018-12-03 at 6.58.49 PM.png

I see that your AA library is really old (H.24 in fact).  I'd be pretty surprised if anything other than AppMeasurement is certified for use with Launch.   I would look at moving to AppMeasurment before doing anything else.

mayurig17133232

22-07-2019

Hi Guys,

i am getting below errors when i try to hit demdex url for DFA. however when i hit the redirect url without the demdex i am able to get adobe analytics beacon.

sample URL : http://example.demdex.net/event?d_event=click&d_src=419397&c_campaign-source=Paid&c_campaign-kpi=AW&...

Your help is really appreciated here as i am loosing all my paid campaign data.

1796734_pastedImage_0.png