Making numerous calls to omniture from same page utilizing JavaScript | Community
Skip to main content
October 17, 2015
Solved

Making numerous calls to omniture from same page utilizing JavaScript

  • October 17, 2015
  • 1 reply
  • 1082 views

Greetings, We are creating site where we are making different ajax calls from a solitary page. We have to track result each of these calls with omniture. There are diverse occasions and eVars characterized in omniture. We are confronting an issue with the way omniture javascript works. There is a capacity s_gi(accountId) that we are getting back to get back an item to which we set every one of the properties. The issue is that, once we call s_gi(accountId), all the resulting calls give back the same properties article, holding all the information that is set already. We have to set new arrangement of properties inevitably. Is there an approach to do this with omniture javascript? e.g. On the off chance that we need to set "event1" for ajax call1, and "event2" for ajax call2, we are accomplishing something like this. For event1, var s = s_gi(accountId) s.events="event1" var s_code = s.t(); if(s_code) { document.write(s_code); } For occasion 2 var s = s_gi(accountId) s.events="event2" s.eVar2 = "administration" var s_code = s.t(); if(s_code) { document.write(s_code); } Is this substantial use? We need to make different calls, in light of the fact that there is nobody "end" point on our site, where we can gather every one of the occasions/eVars and submit without a moment's delay. Much obliged, Unmesh 

regards

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 Gigazelle

Here are the two pages you'll want to look at to resolve your issue.

Implementing for AJAX discusses the issues you're running into: https://marketing.adobe.com/resources/help/en_US/sc/implement/impl_media_ajax.html

Using the clearVars function to start with a clean slate every time to fire an image request: https://marketing.adobe.com/resources/help/en_US/sc/implement/function_clearVars.html

Basically, whenever you trigger the s.t() function, right after that you'll want to trigger the s.clearVars() function so previously defined variables are not sent in subsequent image requests.

1 reply

Gigazelle
Adobe Employee
GigazelleAdobe EmployeeAccepted solution
Adobe Employee
November 3, 2015

Here are the two pages you'll want to look at to resolve your issue.

Implementing for AJAX discusses the issues you're running into: https://marketing.adobe.com/resources/help/en_US/sc/implement/impl_media_ajax.html

Using the clearVars function to start with a clean slate every time to fire an image request: https://marketing.adobe.com/resources/help/en_US/sc/implement/function_clearVars.html

Basically, whenever you trigger the s.t() function, right after that you'll want to trigger the s.clearVars() function so previously defined variables are not sent in subsequent image requests.