BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
mmartinezcampos
Fluorite | Level 6

My company is using Adobe DTM with SAS [Adobe injects the SAS embed script on all pages and custom JS when necessary for particular rules]. I'd like to send custom events to the SAS API without needing to set up a rule on the SAS side. Where can I specify in my script what 'rule'/event should be appearing after the data is processed in SAS, eg: "Clear Cart"?. I see in the documentation that there's eventName but appears to only be for the type of event, eg submit, click, etc.

1 ACCEPTED SOLUTION

Accepted Solutions
OlafKratzsch
SAS Employee
The eventName defines what type of event it is. If you send click, JSVar or submit events with v2 it's the same as you do now with v1. You will have a rule (or multiple ones) that look for specific attributes of the click event like the AltText, URI or any of the data- elements.
If you send business events like a custom event or an internal Search event with v2 all you have to do in the UI to create that event as a JS API event , give it a name and an apiEventKey and define any custom attributes you want to send along. In teh API call you then send that apiEventKey and based on the eventName it ends in the correct table. We are currently updating the documentation and adding the information which table events are ending up based on their eventName.

When using v1 I would always use a click event as it is more flexible and allows for more attributes when using the html5 data- attributes, The documentation has a good example. https://go.documentation.sas.com/?cdcId=cintcdc&cdcVersion=production.a&docsetId=cintag&docsetTarget...

View solution in original post

3 REPLIES 3
OlafKratzsch
SAS Employee

With the current v1 JS API you can only send cart (cartview, checkout, purchase) and cartaction (add, remove, update) events that would go straight to the appropriate table in the data model without the need for a rule in the UI. 

 

With the new v2 JS API (you will need to load the ot-all.min.js tag to get access) you have you can send any event (except a business process step) directly from the API.  That even includes explicit load events in case you are running an SPA. These events will show up in the appropriate tables and will also be available for task targeting, metrics or be streamed to an on-prem agent.

 

See https://go.documentation.sas.com/?cdcId=cintcdc&cdcVersion=production.a&docsetId=cintag&docsetTarget...

 

To receive these API events in the appropriate tables and to be able to use them in Engage tasks you have to declare them in the UI.  There you can also declare any additional custom attributes that you like to send along. Something the v1 API didn't support.  

This is a functionality that we are planing to release in our upcoming March release.

 

Whilst you can already use the v2 API today to send click, submit or the new load events you will have to wait for the March release to take full advantage of it and be able to consume the additional API events like custom, internal search, promotion, product view, etc.

 

See also this community announcement: https://communities.sas.com/t5/SAS-Customer-Intelligence/Preview-of-CI360-March-2020-release-20-03/m...

 

 

 

mmartinezcampos
Fluorite | Level 6

Thanks @OlafKratzsch. Until then, i'll create UI rules. For JS API v2, is eventName the Rule name in SAS? If not, how do I specify which rule will receive the data?  If sending an event from DTM (initiated by a click rule in DTM), should I still use a click event in the SAS UI, or set up a javascript variable change event?

 

An example script to follow would be very helpful. Thanks for your help so far!

OlafKratzsch
SAS Employee
The eventName defines what type of event it is. If you send click, JSVar or submit events with v2 it's the same as you do now with v1. You will have a rule (or multiple ones) that look for specific attributes of the click event like the AltText, URI or any of the data- elements.
If you send business events like a custom event or an internal Search event with v2 all you have to do in the UI to create that event as a JS API event , give it a name and an apiEventKey and define any custom attributes you want to send along. In teh API call you then send that apiEventKey and based on the eventName it ends in the correct table. We are currently updating the documentation and adding the information which table events are ending up based on their eventName.

When using v1 I would always use a click event as it is more flexible and allows for more attributes when using the html5 data- attributes, The documentation has a good example. https://go.documentation.sas.com/?cdcId=cintcdc&cdcVersion=production.a&docsetId=cintag&docsetTarget...
How to improve email deliverability

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.

Discussion stats
  • 3 replies
  • 592 views
  • 2 likes
  • 2 in conversation