Expand my Community achievements bar.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLVED

2 Auth Tokens for Meta CAPI in Event Forwarding

Avatar

Level 3

Hi Everyone, 

I am facing issue in Event forwarding while using 2 different prod token. Its showing error related to data element where i am returning token based on condition.

If i use only 1 token directly in Meta extension its working fine.

 

Can anyone suggest.

 

Thank

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Well basically you create the secrets first and then create a data element that references the secrets.

The "Secret" data element type is able to handle different tokens to cater for the different environment stages.

 

Then, you can just use the regular functionality to retrieve data elements

 

getDataElementValue('myToken')

 

 

Cheers from Switzerland!


View solution in original post

7 Replies

Avatar

Community Advisor

Hi @mrgupta 

what is the error message you are seeing?

Maybe the logic in your Data Element is not working as expected. I would start putting a debug message in there

Cheers from Switzerland!


Avatar

Level 3

Thanks @bjoern__koth for reply. When I am returning single token with out any condition and using the same data element in Meta extension. Here is the error - 

mrgupta_1-1741285460753.png

when i use multiple pixel ID dynamically then following error is getting populated - 

mrgupta_2-1741285624745.png

 

 

 

 

Avatar

Community Advisor

And how does your custom code look?

Cheers from Switzerland!


Avatar

Level 3

@bjoern__koth For token i am simply returning in this way, once this approach works then i was planning to add another token with condition. 

mrgupta_0-1741343432009.png

For dynamic pixel ID following code i am using - 

mrgupta_1-1741343685327.png

 

 

Avatar

Community Advisor

Ah, so you are hardcoding your tokens and don't use the Secrets approach Launch SSF brings?

bjoern__koth_1-1741345003162.png

bjoern__koth_3-1741345043899.png

Maybe try that approach and return the two data elements variations in your custom code instead.

 

 

Cheers from Switzerland!


Avatar

Level 3

Yes, I am passing it as hard coded value.

Could you please share any reference, how to fetch Secret in data element.

Avatar

Correct answer by
Community Advisor

Well basically you create the secrets first and then create a data element that references the secrets.

The "Secret" data element type is able to handle different tokens to cater for the different environment stages.

 

Then, you can just use the regular functionality to retrieve data elements

 

getDataElementValue('myToken')

 

 

Cheers from Switzerland!