The "Contact Information" tag is an HTML code snippet used to record contacts’ data from the ecommerce site in the contact profile fields in Connectif.
What is this tag and where is it used?
The "cn_client_info" tag must be inserted on all pages.
Properties
The different properties of the contact’s information must be defined within the "cn_client_info" tag as child tags, indicating the name of the property in the "class" attribute.
The properties to be included in the tag are:
Name | Required | Type | Multiple | Description |
---|---|---|---|---|
primary_key | Yes | string | No | Primary key. Connectif identifies contacts using their email address. Two contacts cannot have the same email address. |
_name | No | string | No | Contact name. |
_surname | No | string | No | Contact last name. |
_newsletter_subscription_status | No | string | No | Contact’s newsletter subscription status ("Subscribed", "Unsubscribed" or "Never subscribed"). |
Other considerations
To sync data in custom fields a <span> tag must be embedded in the “cn_client_info” class with the ID of the custom field.
In properties based on checkbox-type custom fields, the list of values must be included like this:
<div class="cn_client_info" style="display:none">
<span class="primary_key">email@example.com</span>
<span class="_name">John</span>
<span class="_surname">Doe</span>
<span class="_newsletter_subscription_status">subscribed</span>
<span class="ID-CAMPO">VALOR</span>
<span class="ID-CAMPO" data-field-list="true">
<span>ID-OPCIÓN-1</span>
<span>ID-OPCIÓN-2</span>
...
</span>
</div>
Example
Once the properties are included, the tag will look like this:
<div class="cn_client_info" style="display:none">
<span class="primary_key">email@example.com</span>
<span class="_name">John</span>
<span class="_surname">Doe</span>
<span class="_newsletter_subscription_status">subscribed</span>
</div>
Keep learning!
To make the most of your Connectif account, we recommend reading these articles next:
- Integration using tags, to discover all the notifications you can send from your ecommerce to Connectif and how they work.
- Integration using JavaScript events, to learn about this type of integration, which give you greater control over when and how to send events.
- Integration with Connectif via API, to synchronize contacts, products, purchases and vouchers.
- Check the integration with your ecommerce, so you can be confident that your data is syncing correctly with your Connectif account.