Standard site events

Estimated reading time: 1 min

There are 3 site events to track users’ activity, that are not “ecommerce” specific. Note that those events are not generated by default.

Referer

Used to track users coming from referring websites. Not enabled by default, can be configured from account settings.

Those can be used in segmentations like:

  • users coming from Facebook … (and add more events to subsegment later)

_vteq.push({"referer":{"url":"http://facebook.com/your-page.html"}})

Pageview

Used to track generic site pages, that are not category, product or search pages in an online shop. For example track pageviews from a blog.

The url passed to the pageview event will replace any ” (double quote) with a ‘ (single quote)

_vteq.push({"pageview":{"url":"http://facebook.com/your-page.html"}})

Generic

This is a special event that can be used to track any custom activity of the user: For example: open menu, click a specific button, submit a form etc. This event supports a name and any other attributes.

_vteq.push({
"event": {
   "event_name": "Event name", // required
   "attribute" : number, //optional, add any attributes of type: string, number, float
   "another_attribute": "string value"
}});

Login

  • Needed to tell us when a user has logged in/registered or just introduced an email address in your site
  • All emails are automatically taken from the website if option is enabled on your account
  • Use this event to also pass (any) attributes about users to our system. Make sure the attribute already exists, otherwise it will be ignored
  • File to modify: Every Page where user introduces an email address: Registration/Login/Purchase
  • * Mandatory for emailing personalization

Note: only user email is required in here.

Note: Please also put this code when “Login with Facebook”, when receiving the email from Facebook

<script>
window._vteq = window._vteq || [];
window._vteq.push({
login: {
email: "[email protected]", // required, string, user email
source: "newsletter", // optional, string, to determine where the user logged in. It will overwrite source attribute for the user
firstname: "alex" // optional, string, user full name
}
});
</script>

Update

  • Used to update user profile attributes
  • Files to modify: pages where user profiles changes (Eg: user information page)
<script>
window._vteq = window._vteq || [];
window._vteq.push({
update: {
firstname: "alex"
}
});
</script>
Was this article helpful?
Dislike 0
Views: 60