Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.
SOLVED

Is there a way to use Direct Call in custom code, e.g. _satellite function?

Avatar

Level 2

Hi,

Looking for the best way to set a dynamic data element using setVar right before triggering Direct Call. Can this be done? Is there a better way to do it?

Tx,

Hans

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi Hans,

You may not have heard, but _satellite.track is much improved in Launch (compared to DTM).

The first big improvement is that you can trigger a rule with a call to _satellite.track AND add any additional conditions. In DTM, you could not pair conditions with a direct call rule.

The second big improvement (and the one that will help answer your question) is the ability to pass a JSON object on the call!

_satellite.track('contact_submit', { name: 'John Doe' });

https://docs.adobelaunch.com/client-side-information/launch-object-reference

This allows you to pass any bits of context into the rule and you are guaranteed that they will be there for you in the rule's conditions and actions.

So...

Let's say that you want to grab 'name', and use it in an Adobe Analytics Set Variables action in the same rule.

If you've called _satellite.track as shown above, you can dip into the payload using data element syntax like so:

%event.detail.name%

You can use this syntax in any Launch UI field that is expecting a string or data element reference.

If you want to get at the value from within a custom condition, AA custom code, or 3rd party JS, you can reference it directly as event.detail.name.

Hope that this helps.

-Stew

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi Hans,

You may not have heard, but _satellite.track is much improved in Launch (compared to DTM).

The first big improvement is that you can trigger a rule with a call to _satellite.track AND add any additional conditions. In DTM, you could not pair conditions with a direct call rule.

The second big improvement (and the one that will help answer your question) is the ability to pass a JSON object on the call!

_satellite.track('contact_submit', { name: 'John Doe' });

https://docs.adobelaunch.com/client-side-information/launch-object-reference

This allows you to pass any bits of context into the rule and you are guaranteed that they will be there for you in the rule's conditions and actions.

So...

Let's say that you want to grab 'name', and use it in an Adobe Analytics Set Variables action in the same rule.

If you've called _satellite.track as shown above, you can dip into the payload using data element syntax like so:

%event.detail.name%

You can use this syntax in any Launch UI field that is expecting a string or data element reference.

If you want to get at the value from within a custom condition, AA custom code, or 3rd party JS, you can reference it directly as event.detail.name.

Hope that this helps.

-Stew

Avatar

Level 2

Thanks Stew, actually found your comment on the slack channel before seeing this one and it put me on the right track. I've been relying heavily on Tealium for the past 5 years so lately I spend a lot of time asking myself how do I do this in Launch?   I'm liking what I've seen so far in Launch.. 

Avatar

Level 10

Did Stewart's reply answer your question? If so, would you mind marking it as the correct answer?