Figuring out What SiteSpect is Doing on the Page
The following code is written in PHP and assumes that the client knows only the SSSC cookie and that the Campaign is setup with insightful Tags for Variation Groups:
- The client goes to the discovery page and retrieves the Variation Group resource through the “variationgroup” link relation and Campaign resource through “campaign” link relation.
- The client parses the SSSC cookie, grabs the Site ID, loops through each Variation Group and Campaign combination in the cookie and fills in the URI templates of Variation Group and Campaign resources.
- The client makes an API call to each Variation Group and Campaign resource, finds the name, and prints it on the screen with some other text and formatting.
<?php |