Example tag settings
This example shows a simple configuration of the Start Session, Post Event, Get Offers, and End Session tag settings.
For any tag, you can get the tag field values from the cookie with the cookie method or from the JavaScript object with the javascriptobject method.
These tags support additional parameters that this simple example does not show.
Example Start Session tag settings
Click
to create a Start Session tag. Edit the tag with the following settings.Session ID settings
- Method: Constant
- Constant: 5555
- Data Type: String
- Modifier: <null>
Interactive Channel settings
- Method: Constant
- Constant: WSCDemo
- Data Type: String
- Modifier: <null>
Audience ID settings
- Method: Constant
- Constant: USERS_ID,2002,numeric
- Data Type: String
- Modifier: <null>
Audience Level settings
- Method: Constant
- Constant: WSCUserId
- Data Type: String
- Modifier: <null>
Rely On Existing Session settings
- Method: Constant
- Constant: False
- Data Type: Boolean
- Modifier: <null>
Debug
- Method: Constant
- Constant: True
- Data Type: Boolean
- Modifier: <null>
On Success Callback Function Name settings
- Method: Unassigned
- Value: <null>
On Failure Callback Function Name settings
- Method: Unassigned
- Value:<null>
Example Get Offers tag settings
Click
to create a Get Offers tag. Edit the tag with the following settings.Session ID settings
- Method: Constant
- Constant: 5555
- Data Type: String
- Modifier: <null>
Interact Point Name settings
- Method: Constant
- Constant: AuroraHomepageHeaderBannerLeft
- Data Type: String
- Modifier: <null>
Number Requested settings
- Method: Constant
- Constant: 1
- Data Type: integer
- Modifier: <null>
On Success Callback Function Name settings
- Method: Constant
- Constant: onOfferReturnSuccess
- Data Type: string
- Modifier: <null>
On Failure Callback Function Name settings
- Method: Constant
- Constant: onOfferReturnError
- Data Type: string
- Modifier: <null>
Example Post Event tag settings
Click
to create a Post Event tag. Edit the tag with the following settings.Session ID settings
- Method: Constant
- Constant: 5555
- Data Type: String
- Modifier: <null>
Event Name settings
- Method: Constant
- Constant: ACCEPTOFFER
- Data Type: String
- Modifier: <null>
On Success Callback Function Name settings
- Method: Constant
- Constant: onSuccessTestFunction
- Data Type: String
- Modifier: <null>
On Failure Callback Function Name settings
- Method: Constant
- Constant: onErrorTestFunction
- Data Type: String
- Modifier: <null>
Additional parameter field settings
- Tag Field: UACIOfferTrackingCode:string
- Method: JavaScriptObject
- Object Name: oa.treatmentCode
- Data Type: String
- Modifier: <null>
Example End Session tag settings
Click
to create an End Session tag. Edit the tag with the following settings.Session ID settings
- Method: Constant
- Constant: 5555
- Data Type: String
- Modifier: <null>
On Success Callback Function Name settings
- Method: Unassigned
- Value: <null>
On Failure Callback Function Name settings
- Method: Unassigned
- Value: <null>
Example functions
For the functions used for the On Success Callback Function Name and On Failure Callback Function Name settings, you only have to specify the function name when you create a new tag if the function is already present on your webpage.
You can also use the Digital Data Exchange Utilities to create functions and add them to your webpages.
<script>
oa = {treatmentCode: ""};
function acceptOffer(treatmentCode) {
oa.treatmentCode = treatmentCode;
}
function onOfferReturnSuccess(response) {
var offer = response.offerList[0].offers[0];
var attributes = offer.attributes;
var offerText = "";
var offerLinkURL = "#";
for(var i = 0; i<attributes.length; i++)
{
if(attributes[i].n == "OfferTerms")
{
offerText = attributes[i].v;
}
else if(attributes[i].n == "OfferLinkURL")
{
offerLinkURL = attributes[i].v;
}
}
var link = "<a href=\"'+offerLinkURL+"\" onclick=\"acceptOffer
('"+offer.treatmentCode+"')\">"+offerText+"</a>";
document.getElementById("offerContainer").innerHTML="
<div style=\"text-align:center;padding:
10px 0;background-color:#f5f5f5;\">"+link+"</div>";
}
function onOfferReturnError(response) {
(JSON.stringify(response));
}
</script>