Expand my Community achievements bar.

SOLVED

Custom code page variable set on click event

Avatar

Level 1

Hello,

 

I have a question on my Adobe Launch configuration.

 

I try to send my page information into a click event.

 

I have duplicated the custom code that set the page variables from my page event to my click event.

But for example, my evar13 doesn't seem to be set using the custom code (that works on page event), but checking the console log, the var is well set.

 

I don't understand why the "s.evarX=" function works on my page event but not my click.

 

You will find the screenshots here, as I am limited to four in the post: https://www.swisstransfer.com/d/d6d4f09d-8f11-4025-80ed-60daa6b498c8

 

If anyone has a clue on what I'm doing wrong here, thanks in advance.

Best,

 

 

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Adobe Champion

Hi @GabrielBE2 ,

Assuming you are talking about sending same data in s.t() and s.tl() calls separately, I agree with what @Amruthesh_AG is saying regarding defining the events & variables through s.linkTrackVars and s.linkTackEvents first.

 

Reference links below-

 

https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/linktrackvars

https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/linktrackevents

 

View solution in original post

3 Replies

Avatar

Level 4

@GabrielBE2Check in console by calling _satellite.getVar('data element name') if returning expected value.

 

and also In case if you are setting that variable in custom code just check that you have declared variable in s.linkTrackVars='evarX' attached screenshot FYR.

Amruthesh_AG_0-1729243458001.png

 

 

 

Avatar

Correct answer by
Adobe Champion

Hi @GabrielBE2 ,

Assuming you are talking about sending same data in s.t() and s.tl() calls separately, I agree with what @Amruthesh_AG is saying regarding defining the events & variables through s.linkTrackVars and s.linkTackEvents first.

 

Reference links below-

 

https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/linktrackvars

https://experienceleague.adobe.com/en/docs/analytics/implementation/vars/config-vars/linktrackevents

 

Avatar

Level 1

Thanks @Amruthesh_AG  and @igupta ,

 

You were correct, I needed to use those function : s.linkTrackVars and s.linkTackEvents

 

It works, thank you again for your time and answers.

 

Best regards