Expand my Community achievements bar.

SOLVED

Customer Attributes - how to set it without DTM

Avatar

Level 3
  1. We are investigating how to set up customer attributes without DTM. Where do I call setCustomerID method - in the Marketing Cloud ID library?
  2. Somewhere else?
  3.  
  4. visitor.setCustomerIDs({
  5. "userid":{
  6. "id":rs.web.digitalData.userId,
  7. "authState":Visitor.AuthState.AUTHENTICATED
  8. },

 

Where does the getCustomerID method called?

 

Does anyone have experience to set it via Ensighten or can just explain how they did it without DTM? I looked into available documentation but there are lots of gaps on how to actually do this. 

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

Thanks for reaching out. If you would like to call setCustomerID method without DTM in that case you need to work with VisitorAPI.js and need to embed below code:

visitor.setCustomerIDs({
"userid":{
"id":rs.web.digitalData.userId,
"authState":Visitor.AuthState.AUTHENTICATED
}
});

with in your VisitorAPI.js.

Refer below documents to Implement the Marketing Cloud ID Service for Analytics:

- https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-setup-analytics.html

- https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid_setcustomerids.html

Hope this helps, let me know if you have any further query.

- Ankit Bhatt

View solution in original post

3 Replies

Avatar

Correct answer by
Employee

Hi,

Thanks for reaching out. If you would like to call setCustomerID method without DTM in that case you need to work with VisitorAPI.js and need to embed below code:

visitor.setCustomerIDs({
"userid":{
"id":rs.web.digitalData.userId,
"authState":Visitor.AuthState.AUTHENTICATED
}
});

with in your VisitorAPI.js.

Refer below documents to Implement the Marketing Cloud ID Service for Analytics:

- https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-setup-analytics.html

- https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid_setcustomerids.html

Hope this helps, let me know if you have any further query.

- Ankit Bhatt

Avatar

Level 3

Many thanks Ankit

Just a couple of questions to clarify:

1 I need to insert this code in the very end of the file, after the Visitor.getInstance function? Then we can do that easily.

2 In regards getCustomerId method - do we need use it anywhere? 

Alla

Avatar

Level 3

In addition to this - when I debug and test how this customer ID parameter would look like in the image request?