To all who read this
We have been communicate with SAS team for the last 2 months about this, but they didn't solve our problem. So I post my question here, if you know answer please let me know. Very appreciate your help.
Our Goal is to capture (1) Monetate ID, (2) Monetate Variant, and (3) Montate Campaign.
Based on what SAS told us,
(1) we use the click event. [however, we are not sure whether use click event is right choice to capture it or not]
(2) follow the example SAS provide, this is the code our IT wrote
var dataLayer = window.dataLayer = window.dataLayer || []; for (var i = 0; i <campaigns.length; i++) { com_sas_ci_acs.ap.i("event", "send", { "event": "click", "data-eventtype": "monetate", "data-monetate_campaign": campaigns[i].key, "data-monetate_variant": campaigns[i].split, "data-monetate_ID": campaigns[i].id }); console.log("monetate info sent to SAS"); }
We first did goal configuration as follow:
We did a test, but end didn't capture anything.
Then we use 2nd method they recommend: click event for customer attributes
However,we also end up didn't capture anything .
If you know the answer or have any recommendations, please reply this post.
Thanks
To change this code using the v2 JS API and sending a custom event it would need to look like below. Still requires the campaigns array to be defined and have values, otherwiese no events are getting sent
var dataLayer = window.dataLayer = window.dataLayer || [];
for (var i = 0; i <campaigns.length; i++) {
ci360i("send", {
"eventName": "custom",
"apiEventKey": "MONETATEEVENT",
"monetate_campaign": campaigns[i].key,
"monetate_variant": campaigns[i].split,
"monetate_ID": campaigns[i].id
});
console.log("monetate info sent to SAS");
}
with a matching configuration in the UI under Events -> New -> Custom -> Javascript API
With the release that was released today you could be using the v2 API and send what is now called 'custom events' directly. Don't think that would solve the problem, it would make it just a bit simpler. Your configuration looks good. My guess is that the API calls are never made. Can you see the click events being sent to SAS in the network tab? Do you see the "monetate info sent to SAS" message in the console?
Looking at that JS snippet I am wondering if your campaigns array is defined and if any API calls are even made.
Hi. OlafKratzsch. Thank you for the answer.
Could you explain what you mean here? I am not sure where to find those information.
"Can you see the click events being sent to SAS in the network tab? Do you see the "monetate info sent to SAS" message in the console?"
Thanks
Jingze
CI360 events are sent via POST to the SAS ingest server. When you open the developer tools of your browser (F12 on Windows and Option-Command I on Mac) and go to the 'network' tab you can see what is sent. Just filter for the XHR requests and then select the post request. Usually the domain contains CI360, but it could be different based on the CNAME you have set up.
Attached example is from Firefox. Before you click you need to also check the "persist Logs" option as the click might be recorded on the previous page. When you select these POST requests that go to SAS you can check the details. On Firefox the payload is found under "Params". On Chrome it's under Headers (scroll to the Form Data section). The 'event' attribute tells you if it is a page load, click, etc. When your API calls work you should be able to see a POST request to SAS with the event "click" and your custom data- values. If you can't see this event then it is never sent and the API call never made.
Your JS code that makes the API call contains the line
console.log("monetate info sent to SAS")
So every time an API call to SAS is made you should see the message 'monetate info sent to SAS' in your browser's console. The 'console' is another tab in your browser's developer tools. Probably easier to check that message that looking for the events. If that message isn't printed to the console it means the API call isn't made to the SAS tag and no information sent.
Hope that helps.
Forgot to attache the screenshot I was talking about 🙂
Did you make any progress with your IT?
Hi Jingze,
in the UI you just need to declare the custom event with all the planned custom attributes as described here: https://go.documentation.sas.com/?cdcId=cintcdc&cdcVersion=production.a&docsetId=cintug&docsetTarget...
The API call you need to put into your site is described here: https://go.documentation.sas.com/?cdcId=cintcdc&cdcVersion=production.a&docsetId=cintag&docsetTarget... (we just updated this part to clarify the use of the ApiEventKey which was missing in a previous version)
To change this code using the v2 JS API and sending a custom event it would need to look like below. Still requires the campaigns array to be defined and have values, otherwiese no events are getting sent
var dataLayer = window.dataLayer = window.dataLayer || [];
for (var i = 0; i <campaigns.length; i++) {
ci360i("send", {
"eventName": "custom",
"apiEventKey": "MONETATEEVENT",
"monetate_campaign": campaigns[i].key,
"monetate_variant": campaigns[i].split,
"monetate_ID": campaigns[i].id
});
console.log("monetate info sent to SAS");
}
with a matching configuration in the UI under Events -> New -> Custom -> Javascript API
Want to review SAS CI360? G2 is offering a gift card or charitable donation for each accepted review. Use this link to opt out of receiving anything of value for your review.
Listen to the Reimagine Marketing podcast
Assess your marketing efforts with a free tool
SAS Customer Intelligence Learning Subscription (login required)
Compatibility notice re: SAS 9.4M8 (TS1M8) or later
SAS' Peter Ansbacher shows you how to use the dashboard in SAS Customer Intelligence 360 for better results.
Find more tutorials on the SAS Users YouTube channel.
Want to review SAS CI360? G2 is offering a gift card or charitable donation for each accepted review. Use this link to opt out of receiving anything of value for your review.
Listen to the Reimagine Marketing podcast
Assess your marketing efforts with a free tool
SAS Customer Intelligence Learning Subscription (login required)
Compatibility notice re: SAS 9.4M8 (TS1M8) or later