Are DCR event details unique? | Community
Skip to main content
August 5, 2020
Solved

Are DCR event details unique?

  • August 5, 2020
  • 1 reply
  • 1909 views

Hello!

 

When you call a Direct Call Rule (DCR) with Additional Parameters, as showcased in this post, is all of this information added to the same event details object? Meaning, if two DCRs are called at the same time, and both DCRs pass additional information and then use that to set eVars/props using event.detail, will each DCR set the correct information? Or will the data in event.detail be replaced with whatever DCR was fired last?

 

My addon to this would be whether or not it's possible to access the additional information passed in data elements via event.detail?

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 Brian_Johnson_

@ng772  - The extra information you pass should be unique to each call. If you call two DCRs in rapid succession, and each DCR has a unique payload (event.detail), the values available to each DCR will come from their respective payload, setting the correct (expected) values.

 

For your last question, anything passed in as the second argument in the _satellite.track() call will be accessible to you inside the DCR. Consider the example below:

 

 

 

var payload = { make: "Honda", model: "Civic", color: "Purple" } _satellite.track("getCarInfo", payload);

 

 

 

In the DCR, you would be able to specify event.detail.make, event.detail.model, and event.detail.color to gather the car information and map to props/eVars/etc.

 

If you're asking if it's possible to collect/build a history of everything passed in over the course of several calls to _satellite.track(), that's a solution you'd have to custom build.

1 reply

Brian_Johnson_
Brian_Johnson_Accepted solution
Level 8
August 7, 2020

@ng772  - The extra information you pass should be unique to each call. If you call two DCRs in rapid succession, and each DCR has a unique payload (event.detail), the values available to each DCR will come from their respective payload, setting the correct (expected) values.

 

For your last question, anything passed in as the second argument in the _satellite.track() call will be accessible to you inside the DCR. Consider the example below:

 

 

 

var payload = { make: "Honda", model: "Civic", color: "Purple" } _satellite.track("getCarInfo", payload);

 

 

 

In the DCR, you would be able to specify event.detail.make, event.detail.model, and event.detail.color to gather the car information and map to props/eVars/etc.

 

If you're asking if it's possible to collect/build a history of everything passed in over the course of several calls to _satellite.track(), that's a solution you'd have to custom build.

ng772Author
August 25, 2020
@brian_johnson_ yes, thank you