Expand my Community achievements bar.

SOLVED

Issue with timing, data layer, and setting suites

Avatar

Level 1

So I have set my report suite in the extension configuration as:

%rsid%

And then my data element is:

Javascript variable name: window.aaData.rsid

And in the bottom of my page's html:

var aaData = {

    "rsid": "suite1,suite2"

}

Now when I go to the page I get:

[Adobe Analytics] Creating AppMeasurement tracker with these report suites: ""

It appears that it initializes appmeasurement before my data layer has loaded.

Any ideas on how I could make it wait, or recheck the data layer?

1 Accepted Solution

Avatar

Correct answer by
Level 4

I'm surprised that you haven't gotten an answer on this one yet.  Unfortunately, it probably due to the fact that there isn't much you can do in the current scenario.  The catch of using information in a data layer, is that the data layer must exist before your code trying to use it.  In this scenario, it means your aaData object must be fully defined before the Adobe Launch include.

But where there's a will, there's a way:

You may be able to take a different approach to this, by thinking about what logic you need in order to define the report suite yourself.  Once you know the required logic, you can execute that within the data element - and not require it to be defined in a data layer.  Your rsid data element can be a custom code data element that returns a different report suite ID depending on the hostname or path of the page.

For me, personally, I love using this approach to make the determination whether I'm on a production site, or a dev site, before returning the Dev report suite or Prod report suite ID's.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 4

I'm surprised that you haven't gotten an answer on this one yet.  Unfortunately, it probably due to the fact that there isn't much you can do in the current scenario.  The catch of using information in a data layer, is that the data layer must exist before your code trying to use it.  In this scenario, it means your aaData object must be fully defined before the Adobe Launch include.

But where there's a will, there's a way:

You may be able to take a different approach to this, by thinking about what logic you need in order to define the report suite yourself.  Once you know the required logic, you can execute that within the data element - and not require it to be defined in a data layer.  Your rsid data element can be a custom code data element that returns a different report suite ID depending on the hostname or path of the page.

For me, personally, I love using this approach to make the determination whether I'm on a production site, or a dev site, before returning the Dev report suite or Prod report suite ID's.