Event Collection

Velocidi enables you to collect real-time events in your customer data platform with first-party tags:

  • The preferred method for capturing events from your website is via JavaScript tag;
  • Alternative methods are provided for when JavaScript is not available for capturing events:

Via JavaScript tag#

This method provides the most flexible approach for tracking events and it is the preferred method. Its main use case it to capture user interactions with the E-commerce website. The event channels expected to be collected via this method are: Web and E-Commerce.

Including the tag#

In order to use the tag in a site, the following snippet is the minimum piece of code that should be included on the page. It should be added as close to the opening <head> tag as possible. This snippet only needs to be included once per page.

<script async src="https://cdn.cdp.<WEBSITE_DOMAIN>/pcdp_1.0.js"></script>
window.pcdpLayer = window.pcdpLayer || [];
window.pcdp = function(){pcdpLayer.push(arguments)};
Don't forget to change the URL

Since Velocidi provides a first-party system for each client, each client must include the system-tailored script tag from their domain. The URL should be replaced with your system endpoint. This applies to all interactions.

For standard installations, a client whose website is at example.com would use the following URL: https://cdn.cdp.example.com/pcdp_1.0.js.

For a detailed JavaScript tag API see JavaScript tag.

Using the tag#

Once the tag as been included, you can begin collecting user interactions with your site by calling the pcdp function and specifying the required parameters for each event type.

window.pcdpLayer = window.pcdpLayer || [];
window.pcdp = function(){pcdpLayer.push(arguments)};
pcdp("event", "track", {
type: "pageView",
... // See required parameters for each event type

For this example, you can see its required parameters in the Page View details page.

For more information about supported events and their details see the Complete list of events by categories.

Via image (pixel) interface#

This interface does not require JavaScript and returns a 1x1px transparent gif image (pixel) which you can render anywhere on the page and track the user. It accepts the same parameters as the JavaScript tag, URL-encoded, as GET query parameters. Both HTTP and HTTPS are supported.

style="display: none; visibility: hidden; border: 0;"
alt="" width="0" height="0" />

For this example, you can see its required parameters in the Ad View details page.

Via click-through interface#

This interface is used to capture clicks before directing browsers to the original destination URL. It can be used for tracking clicks on display banners, search ads, e-mails, and any other type of click-through.


Please note that this interface requires you to URL-encode all parameters, including the ourl. For when it is not feasible to perform a URL encode on the ourl, you can use the next interface (/events/click0 instead of /events/click) where you can provide the non-encoded ourl but it must be the last query parameter of the URL.


For these examples, you can see its required parameters in the Ad Click details page.

API Reference#

For more technical details see the API Reference.

Event verification#

Once you have tagged your website or during that process you can verify that the events are entering the system correctly using our dashboard.

Latest collected events in dashboard#

You can see the latest collected events in the Dashboard under Collect > Events > All Events.

Dashboard latest events


If all of your tags are implemented correctly, there is nothing more for you to do. However, in the case that something goes awry, you'll see an error message in the Events page of your Velocidi user interface, letting you know immediately what needs to be corrected.

Dashboard latest events error

Any time you see an yellow exclamation point in the ‘Event type' column, you can click into the event details to see the specific errors flagged for that event. When you see errors in your events stream, contact your designated client support specialist and we will help resolve the issue.

Last updated on