Send CANDDi 'properties' from your database
When a User has logged into your website, it can be useful to send additional properties from your database through to CANDDi, for example: whether the user is a customer, or their user ID from your database.
NOTE: This is a technical article for developers
You need to trigger a tracking call to CANDDi after the window has loaded. Write the following code into the body of the first page generated after the user has logged in.
NOTE: This assumes you are using jQuery to use $( document ).ready
$( document ).ready(function() {
if(window.canddi) {
var objTags = {
"property1":1,
"property2":2
...
[tag] : [score //typically score = 1 but you can use other numbers here]
};
window.canddi.sendEvent('#!-1',objTags,false,"TagContact");
}
});
Once the page has loaded then the values in ‘property1’ will be transmitted back to CANDDi and stored against the contact.
Have more questions? Contact us at hello@canddi.com or 0161 414 1080
NOTE: This is a technical article for developers
You need to trigger a tracking call to CANDDi after the window has loaded. Write the following code into the body of the first page generated after the user has logged in.
NOTE: This assumes you are using jQuery to use $( document ).ready
$( document ).ready(function() {
if(window.canddi) {
var objTags = {
"property1":1,
"property2":2
...
[tag] : [score //typically score = 1 but you can use other numbers here]
};
window.canddi.sendEvent('#!-1',objTags,false,"TagContact");
}
});
Once the page has loaded then the values in ‘property1’ will be transmitted back to CANDDi and stored against the contact.
Have more questions? Contact us at hello@canddi.com or 0161 414 1080
Updated on: 06/02/2020
Thank you!