(How) Can I use the data elements (from DataLayer) in the library management of the DTM?

yuya_thomast381

04-01-2019

Hello, I need some help here...

We use a few Report Suits and want to spread the traffics per region (e.g. EU and NA) to the appropriate Report Suite.

We made a custom rule in the Library Management for this solution. (JavaScript Custom Editor)

1660225_pastedImage_0.png

The JS code:

  // NA Prd – Report Suite

if(_satellite.getVar('spa_geoRegion')=='na'){

    var s_account = 'na-prd';

  // EU Prd - Report Suite

  }else if(_satellite.getVar('spa_geoRegion')=='eu'){

    var s_account = 'eu-prd';

  // Global Prd - Report Suite

  }else{

    var s_account='global-prd';

}

var s_runr=s_gi(s_account);

The value of the data element "spa_geoRegion" is from a dataLayer (e.g. geoRegion: na) and also used as eVar1.

For Example: the NA page is loaded (see below)

dataLayer:

1660229_pastedImage_4.png

The value of the data element:

1660228_pastedImage_3.png

This website is SPA.

When we load the NA page for the first time the report suite id is always marked as "global-prd" even though we expect the report suite to be "na-prd".

1660227_pastedImage_2.png

After the first loading the report suite id is correctly marked as "na-prd".

1660226_pastedImage_1.png

Thank you in advance for your help.

Best regards,

yu

Accepted Solutions (0)

Answers (0)