...
Integration with JavaScript (synchronous)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<html> <head> </head> <body> <script src="spring.js"> </script> <script language="Javascript"> var sp_e0 = { "s":"testsite", "cp":"Path/to/your/page", //Please go to Chapter ContentPath(cp) "url": document.location.href }; spring.c(sp_e0); </script> </body> </html> |
Example for shortened Form
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<html> <head> <script type="text/javascript"> var springq = springq || []; springq.push({ "s":"testsite", "cp":"Path/to/your/page", //Please go to Chapter ContentPath(cp) "url": document.location.href }); </script> </head> <body> <script type="text/javascript"> // some other script </script> <!-- some stuff goes here --> <!-- end of page --> <script type="text/javascript"> (function() { var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true; scr.src = 'spring.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(scr, s); })(); </script> </body> </html> |
Integration by using multiple Pagetags (synchronous)
...
Code Block | ||||
---|---|---|---|---|
| ||||
<html> <head> </head> <body> <script src="spring.js"> </script> <script language="Javascript"> var sp_s = { "s":"testsite", "r": document.referrer }; var sp_e0 = []; sp_e0.push({ "cp":"path/to/page/one", //Please go to Chapter ContentPath(cp) "url": document.location.href }); sp_e0.push({ "cp":"path/to/page/two", //Please go to Chapter ContentPath(cp) "url": document.location.href }); // ... spring.c(sp_s,sp_e0); </script> </body> </html> |
Info |
---|
When using multiple „cp“-attributes, a call to spring.c requires two arguments: the first containing information about the sitename and the document referrer for page-tracking purposes, the second an array with the „cp“-elements. |
...
Code Block | ||
---|---|---|
| ||
<html> <head> <script type="text/javascript"> var spring_asy = []; var sp_e0 = []; var springq = springq || []; var sp_s = { "s":"testsite", "r":document.referrer }; sp_e0.push({ "cp":"path/to/page/one", //Please go to Chapter ContentPath(cp) "url": document.location.href }); sp_e0.push({ "cp":"path/to/page/two", //Please go to Chapter ContentPath(cp) "url": document.location.href }); spring_asy.push(sp_s); spring_asy.push(sp_e0); springq.push(spring_asy); </script> </head> <body> <script type="text/javascript"> // some other script </script> <!-- some stuff goes here --> <!-- end of page --> <script type="text/javascript"> (function() { var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.async = true; scr.src = 'spring.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(scr, s); })(); </script> </body> </html> |
...