how to track custom eVar/prop | Community
Skip to main content
samuelel1823078
January 1, 2021
Solved

how to track custom eVar/prop

  • January 1, 2021
  • 3 replies
  • 1706 views

Hi,

I have integrated the appMeasurement.js and now my site is subject to tracking for all the default properties (visits, pagename and so on). Now I want to track a custom variable so i have added the following code inside the onclick function of a button:

s.eVar10="hello"; s.prop10="1";s.t(); The desired is to see a graph that reports the number of times the button has been clicked.

Unfortunately, I'm not able to find any graph for this purpose, if someone can help me it would be really appreciated.

Maybe the custom variables must be manually defined inside the workspace to start the tracking?

 

thanks in advance

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 amgup

Hello @samuelel1823078 

If you want to track/count the number of times the button was clicked than you can set up the counter event on the click of the button.
eg- s.events="event1";


Than you can check the event1 in the workspace project.

You can check the below link for more information related to its implementation:-

https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/events/events-overview.html#s.events-in-appmeasurement-and-launch-custom-code-editor

 

3 replies

amgupAccepted solution
Level 7
January 1, 2021

Hello @samuelel1823078 

If you want to track/count the number of times the button was clicked than you can set up the counter event on the click of the button.
eg- s.events="event1";


Than you can check the event1 in the workspace project.

You can check the below link for more information related to its implementation:-

https://experienceleague.adobe.com/docs/analytics/implementation/vars/page-vars/events/events-overview.html#s.events-in-appmeasurement-and-launch-custom-code-editor

 

yuhuisg
Community Advisor
Community Advisor
January 2, 2021

With button clicks, you normally want to track them with Custom Links using the s.tl() function.

See "Make link tracking calls within a custom function" at https://experienceleague.adobe.com/docs/analytics/implementation/vars/functions/tl-method.html#examples-and-use-cases.

jantzen_b
Adobe Employee
Adobe Employee
January 25, 2021
Do any of the answers below answer your initial question? If so, can you select one of them as the correct answer? If none of the answers already provided answer your question, can you provide additional information to better help the community solve your question?