Page visit notification

 

Questo articolo è attualmente disponibile in inglese e spagnolo. Puoi fare riferimento a questa documentazione mentre arriva nella tua lingua.

The "Page visit notification" event is used to report when a contact visits any page. The event notifies you when a user makes a visit to your website, via JavaScript using the function connectif.managed.sendEvents.

  

This article is part of the guide to creating a custom integration.
If your integration is via a module, this tag will be added to your ecommerce platform automatically.

 

How to use it

The page visit notification uses the entityInfooption, of the sendEvents method, to enrich the information about sent events.

  

This report via JavaScript is an alternative to implementing the "Page Tag" in the HTML of your store or website.

 

Report browser and page information

This type of event automatically collects the following information:

  • Browser Info:
    • Device type: mobile or desktop
    • URL
    • Referer
    • IP
  • Page info::
Attribute Definition Limitations
title

The head<title></title>of the Web page where the event occurs.

The first 50 characters are obtained, the rest disregarded.
keywords

The first 10 keywords of the<meta name='keywords' content="key1,key2,key3">.

The first 10 keywords are obtained, the rest disregarded. Each keyword element can have a value of maximum 25 characters, remaining characters will be disregarded.
tags

The information obtained via the "Page Tag".

The first 10 tags are obtained, the rest disregarded. Each "tag" element can have a value of maximum 25 characters, the rest of the characters disregarded.
categories

The information obtained via the "Page Category"tag.

The first 10 categories are obtained, the rest disregarded. Each "category" element can have a maximum of 25 characters, with the remaining characters disregarded.

 

Other considerations

The options in the sendEvents method allow you to overwrite some or all of the values of the information on the page.

connectif.managed.sendEvents([
    { "type": "page-visit" }
], { entityInfo, cart, pageInfo: { 
    tags: ['tag1','tag2'],
    categories: ['cat1', 'cat2']
});
 

In the example above, page title and keywords are obtained from the HTML of the page, while tags and categories are collected from the sendEvents method.
This option allows you to customize this information without having to implement the "Page Tag" and "Page Category" tag.

 

Example

The notification will look like this:

connectif.managed.sendEvents([
    { "type": "page-visit" }
], { entityInfo, cart, pageInfo: {
    title: 'My page title',
    keywords: ['key1', 'key2'],
    tags: ['tag1','tag2'],
    categories: ['cat1', 'cat2']
}});

 

 

Congratulations!
You’ve reached the end of the tutorial.

  

Do you have questions?
Don’t forget, our Connectif specialists are here to help you. To contact them, just open a Support ticket by clicking the blue “Help” button on your dashboard.


Keep learning!

To make the most of your Connectif account, we recommend reading these articles next:

Questo articolo ti è stato utile?
Utenti che ritengono sia utile: 0 su 0