Google Analytics integration with Adobe Target

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

18-01-2017

Hi, Has anybody had any success in integrating Adobe Target with both GA classic and universal analytics - Most of the posts I've seen are fairly outdated (c.2012)

I'm looking to pass the test variation name into a GA event so we can track transactional impact of tests.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

22-01-2017

Hi Mathew,

To achieve the use case discussed above,  You need to create an HTML offer inside Adobe Target and then in that offer you can write the JS code to pass data to GA and then apply the offer to an Experience inside an Activity (Campaign) . Please follow the below steps to achieve the same :

  • Login to Adobe Target
  • Add a new HTML Offer (Offers > Create > HTML Offer)
  • Name the offer say "Testing Offer"  Configure and paste in the JavaScript code (with the <script> tags intact)

  You may customize the below  Google Analytics code as per your need
Here’s the script:

<script type="text/javascript"> alert("Your Campaign name is " + '${campaign.name}' + " :Your Experience name is "+ '${campaign.recipe.name}'+" :Your campaign Id is "+'${campaign.id}' +" :Your Experience ID is "+ '${campaign.recipe.id}' + " :Your Experience Traffic Type is "+'${campaign.recipe.trafficType}'); var sCampaignName='${campaign.name}'; var sExperienceName = '${campaign.recipe.name}'; _gaq.push(['_setCustomVar',1,'Target' + sCampaignName,sExperienceName,1]); _gaq.push(['_trackEvent','Target',sCampaignName,sExperienceName,undefined,true]); </script>
  • Apply the above created Offer to an Experience in an Activity say "Experience B"

  • For Validation & Testing , we have put alert in offer created above & output will be similar to the snapshot shown below :

Thanks & Regards

Parit Mittal

Answers (18)

Answers (18)

Avatar

Avatar
Validate 10
Level 3
ketangp28686788
Level 3

Likes

23 likes

Total Posts

73 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
ketangp28686788
Level 3

Likes

23 likes

Total Posts

73 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
ketangp28686788
Level 3

28-01-2018

Hi Julien,

I have checked that section, I don't see anything there when I opened the webpage.

The steps that I have followed are  :

I have added GA account Identifier in _setAccount method of script

Added the below code in custom code section of both the activities of AB Testing.

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-#######-1']);

try {

     if (typeof(s_tnt) == 'undefined') {
          var s_tnt = '';
     }
     
  if (typeof(_gaq) == 'undefined') {
          var _gaq = [];
     }
 
     s_tnt += '${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType},';

     var sCampaignName = '${campaign.name}';
     var sRecipeName = '${campaign.recipe.name}';

     if (sCampaignName.length > 0 && sRecipeName.length > 0) {
        
          _gaq.push(['_setCustomVar',1,'Target:' + sCampaignName,sRecipeName,1]);
          _gaq.push(['_trackEvent','Adobe Target',sCampaignName,sRecipeName,undefined,true]);

     }
}
catch(e){
console.log(e.message);
}
</script>

Have I followed the correct steps ?

Thanks

Avatar

Avatar
Validate 1
Level 1
julienb20151765
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
julienb20151765
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
julienb20151765
Level 1

25-01-2018

You should be able to see it in events

1403134_pastedImage_0.png

Filter on event category name 'Adobe Target'

You'll see events, then you could create custom segments in order to compare

people who did see 'RecipeName1' vs 'RecipeName2' and so on.

1403156_pastedImage_0.png

Then you can explore Google Analytics with those segments

Hope it'll solve your problem Ketan

Best Regards ,

Julien BIJOUX - Vidomia

Avatar

Avatar
Validate 10
Level 3
ketangp28686788
Level 3

Likes

23 likes

Total Posts

73 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
ketangp28686788
Level 3

Likes

23 likes

Total Posts

73 posts

Correct reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
ketangp28686788
Level 3

22-01-2018

Hi Matthew,

I tried the code you mentioned in below, but I could not see the activity name or any details in Google Analytics

Although when I tried the variable mentioned in script in alert box it popped up.

For configuring following script  I have added  this into custom code of each experience using VEC & accordingly passed

GA account ID in each experience.

Can anybody tell what could be the issue &  where to check the target experience details in google analytics ?

It will be very helpful if some one can provide some documentation.

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-#######-1']);

try {
     if (typeof(s_tnt) == 'undefined') {
          var s_tnt = '';
     }
     
  if (typeof(_gaq) == 'undefined') {
          var _gaq = [];
     }
 
     s_tnt += '${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType},';

     var sCampaignName = '${campaign.name}';
     var sRecipeName = '${campaign.recipe.name}';

     if (sCampaignName.length > 0 && sRecipeName.length > 0) {
        
          _gaq.push(['_setCustomVar',1,'Target:' + sCampaignName,sRecipeName,1]);
          _gaq.push(['_trackEvent','Adobe Target',sCampaignName,sRecipeName,undefined,true]);

     }
}
catch(e){
console.log(e.message);
}
</script>

Thanks,

Ketan Pardeshi

Avatar

Avatar
Validate 1
Level 1
julienb20151765
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
julienb20151765
Level 1

Likes

0 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
julienb20151765
Level 1

02-10-2017

Seems last version add a real game changer feature

that can enhance the problem : response token

1316520_pastedImage_3.png

Those information are very usefull to feed Google Analytics custom dimension or events

If someone has already written a such extension i'll be glad to use it

Avatar

Avatar
Level 1
amods26652088
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
amods26652088
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
amods26652088
Level 1

22-09-2017

Hello Parit,

Is there any way to capture multiple campaign names on the same page. This seems to only capture one campaign.

Vacations, Resorts, and All-Inclusive Packages | CheapCaribbean.com and Slack - Auryc Inc.

Thanks

Amod

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

05-05-2017

Hi Fabian,

The code editor is currently available for A/B, Experience Targeting, Multivariate Test, and Automated Personalization activities. The code editor is disabled for overlay and if a redirect is applied to an Experience.

Also, We can't load an script on a whole Activity it has to be alplied to individual Expereinces

Regards

Parit

Avatar

Avatar
Level 1
fabiáni62494629
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
fabiáni62494629
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
fabiáni62494629
Level 1

04-05-2017

I have the same problem...

In addition, is it possible to load a script on a whole activity?

thanks!

Regards

Avatar

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
gaurav_narale
Level 1

27-01-2017

Hi Parit,

Really appreciate your help in answering the questions.

I am still not able to resolve this completely as stated in my previous post. I am running an A/B test using visual editor. My experience B is a redirect URL. I would love to track both experiences A and B separately in GA. The problem is as soon as I enter redirect URL in experience B, the interface locks up and does not allow me to add any custom code or swap offer. Do you have any suggestion?

Regards.

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

26-01-2017

Hi Gaurav/ Mathew,

I hope that answers provided above resolves your query. If yes, Can you please mark this query as resolved.

Thanks & Regards

Parit Mittal

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

25-01-2017

I'm not sure there is a solution here other than potentially passing over a ? url tracking code when you redirect and comparing visits of that vs. control - A bit messy I think but would still be able to track the 2 variations in GA. 

Avatar

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
gaurav_narale
Level 1

24-01-2017

How will this work if i have a redirect url as Experience B? The interface does not allow to make any changes to custom code once I enter the redirect url in Experience B.

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

24-01-2017

The code below seems to be working  - you have to copy into the custom code section of each test and variation. you also need to remove from adding into the head of each page. 

 

<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-#######-1']);

try {
     if (typeof(s_tnt) == 'undefined') {
          var s_tnt = '';
     }
      
  if (typeof(_gaq) == 'undefined') {
          var _gaq = [];
     }
  
     s_tnt += '${campaign.id}:${campaign.recipe.id}:${campaign.recipe.trafficType},';

     var sCampaignName = '${campaign.name}';
     var sRecipeName = '${campaign.recipe.name}';

     if (sCampaignName.length > 0 && sRecipeName.length > 0) {
         
          _gaq.push(['_setCustomVar',1,'Target:' + sCampaignName,sRecipeName,1]);
          _gaq.push(['_trackEvent','Adobe Target',sCampaignName,sRecipeName,undefined,true]);

     }
}
catch(e){
console.log(e.message);
}
</script>

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

24-01-2017

Thanks,

As we are not building out a new offer and the GA code is additional to existing content all that happens is it removes whatever we have selected and replaces with the GA tracking code. 

Is there no way of adding into the page another way? I have used a variation inside the custom code section but it doesn't seem to fire inside Google Chrome

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

23-01-2017


Hi Gaurav/Mathew

The example I have explained above is for Form Based Experience Composer but it seems you both are using Visual Experience Composer so in VEC , Once the Page Loads in an Experience , When you click on a page element which you want to replace with the offer , a menu shows the options that are available for that element type. Click Swap Offer and then select the the offer say "Testing Offer" from content / Offer library.

For more VEC options see : https://marketing.adobe.com/resources/help/en_US/target/target/r_viztarget_options.html

Thanks & Regards

Parit Mittal

Avatar

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile

Avatar
Level 1
gaurav_narale
Level 1

Likes

0 likes

Total Posts

3 posts

Correct reply

0 solutions
View profile
gaurav_narale
Level 1

23-01-2017

I am interested in knowing this as well. Same as Matthew I am not able to see content option anywhere under configure.

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

23-01-2017

Thanks..I guess the problem I have is that I cant see any content arrow or anywhere to apply the offer (as per screenshot)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

23-01-2017

Hi ,

Please click "Content" arrow ">"  inside the experience to apply the offer to experience,

Thanks

Parit

Avatar

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
matthewb2051561
Level 4

Likes

89 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
matthewb2051561
Level 4

23-01-2017

ParitMittal wrote...

Hi Mathew,

To achieve the use case discussed above,  You need to create an HTML offer inside Adobe Target and then in that offer you can write the JS code to pass data to GA and then apply the offer to an Experience inside an Activity (Campaign) . Please follow the below steps to achieve the same :

  • Login to Adobe Target
  • Add a new HTML Offer (Offers > Create > HTML Offer)
  • Name the offer say "Testing Offer"  Configure and paste in the JavaScript code (with the <script> tags intact)

  You may customize the below  Google Analytics code as per your need
Here’s the script:

  1. <script type="text/javascript">
  2. alert("Your Campaign name is " + '${campaign.name}' + " :Your Experience name is "+ '${campaign.recipe.name}'+" :Your campaign Id is "+'${campaign.id}' +" :Your Experience ID is "+ '${campaign.recipe.id}' + " :Your Experience Traffic Type is "+'${campaign.recipe.trafficType}');
  3. var sCampaignName='${campaign.name}';
  4. var sExperienceName = '${campaign.recipe.name}';
  5. _gaq.push(['_setCustomVar',1,'Target' + sCampaignName,sExperienceName,1]);
  6. _gaq.push(['_trackEvent','Target',sCampaignName,sExperienceName,undefined,true]);
  7. </script>
  • Apply the above created Offer to an Experience in an Activity say "Experience B"

  • For Validation & Testing , we have put alert in offer created above & output will be similar to the snapshot shown below :

Thanks & Regards

Parit Mittal

 

Thanks Parit, When I click configure I get multiple options e.g. 'Add mobile viewpoints' but nowhere I can see where to apply my specific offer Ive created?