Expand my Community achievements bar.

Join us for the next Community Q&A Coffee Break on Tuesday April 23, 2024 with Eric Matisoff, Principal Evangelist, Analytics & Data Science, who will join us to discuss all the big news and announcements from Summit 2024!
SOLVED

Customizing s_code

Avatar

Level 3

Is it possible to replace instances of "s." to "sr." within the s_code.js only when "s." is used as a variable?

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi David,

Yes, it is possible to use a different appmeasurement instance variable. You have two options:

  • (Recommended) Use DTM. There is an option to change s to whatever variable you'd like.
  • Have a supported user contact Customer Care and request an alternate s_code.js file. Agents have access to a tool which compiles the latest s_code.js file with any custom variable you'd like, preceded with "s_".

View solution in original post

7 Replies

Avatar

Level 10

Hi there,

Thanks for reaching out to Community.

Changing the variables can lead to problems: See the below doc for example:

https://marketing.adobe.com/resources/help/en_US/sc/implement/appmeasure_mjs_pagecode.html

Thanks!

Avatar

Correct answer by
Employee Advisor

Hi David,

Yes, it is possible to use a different appmeasurement instance variable. You have two options:

  • (Recommended) Use DTM. There is an option to change s to whatever variable you'd like.
  • Have a supported user contact Customer Care and request an alternate s_code.js file. Agents have access to a tool which compiles the latest s_code.js file with any custom variable you'd like, preceded with "s_".

Avatar

Level 1

s_code.js update version from where i can download.

Avatar

Level 10

DEEPAK jain wrote...

s_code.js update version from where i can download.

 

If you have admin priviledges you can download the latest javascript from Admin> Code Manager

Avatar

Level 1

Yeah I am having the admin previlage. Please find the attached screenshot for your reference. i dont see s_code.js anywhere.

Avatar

Level 10

Download the 'Javascript new' files. The new name for s_code is appmeasurement.js which you will find in the downloaded folders.

Thanks

Avatar

Level 1

Thanks Tanmay. 

Please find the attached file .This is what my file is i need one help.. if you see many places new fuction is used which from security point of view is not recommended.

They told us to remove new function from the file and you will be good is there a way if you can provide me the updated code of attached s_code.js