Using existing context data to populate eVars/ probs using launch | Community
Skip to main content
New Participant
October 5, 2020
Solved

Using existing context data to populate eVars/ probs using launch

  • October 5, 2020
  • 2 replies
  • 1218 views

Hi all,

 

New to launch so apologies if this is a basic question!  Is there a way to use context data that already exists to populate eVars and props using adobe launch rather than the Analytics interface?

 

Thanks!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jacob-DDdev

There are many benefits, flexibility, and conveniences for other projects/developers to just continue using context data and using the Analytics processing to do the mapping, as @yuhuisg suggests.

 

However, to answer your question, it is relatively simple to set the variables directly in custom code (probably within the same rule as the beacon fire):

First, make sure the s object is set globally in the Analytics extension and then write custom code before firing the beacon that appears as the following:

 

 

s.propn = s.contextData["exampleDatan"]; s.evarn = s.contextData["moreExampleDatan"];

 

 

 

2 replies

Jacob-DDdev
Jacob-DDdevAccepted solution
New Participant
October 5, 2020

There are many benefits, flexibility, and conveniences for other projects/developers to just continue using context data and using the Analytics processing to do the mapping, as @yuhuisg suggests.

 

However, to answer your question, it is relatively simple to set the variables directly in custom code (probably within the same rule as the beacon fire):

First, make sure the s object is set globally in the Analytics extension and then write custom code before firing the beacon that appears as the following:

 

 

s.propn = s.contextData["exampleDatan"]; s.evarn = s.contextData["moreExampleDatan"];

 

 

 

Jacob-DDdev
New Participant
October 8, 2020

@c1553, I forgot to mention. If you're doing click tracking, s.tl(), calls, you'll also need to set s.linkTrackVars string to include each variable to send with the beacons, ref.

E.g.

s.linkTrackVars = "propx,evary,evarz";
yuhuisg
New Participant
October 5, 2020

I haven't tried it myself, but I suppose it can be done.

On the other hand, context data is meant to be used with Analytics directly. So you need to consider if your future self or your successor(s) will be able to remember how you're using context data with Launch instead.