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 a JavaScript tag. Velocidi provides alternative methods for when JavaScript is not available for capturing events from certain sources, namely a pixel interface or a redirect interface, which can be used for tracking e-mail events or clicks.

The internal API used to capture events is also documented and can be used for custom activations, as described by the Event API documentation.


Implementing 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. You’ll see this tag in several places within our documentation, but it only needs to be implemented once.

<script async src="https://cdn.cdp.velocidi.com/pcdp_1.0.js"></script>
  window.pcdpLayer = window.pcdpLayer || [];
  window.pcdp = function(){pcdpLayer.push(arguments)};

The pcdp_1.0.js is system specific and should be replaced with the specific URL for your system.

For a detailed API usage guide, please refer to the Developers Resources.

Image (pixel) interface

<img style="display: none; visibility:hidden; border: 0 none;" width="0" height="0"
src="https://tr.velocidi.com/events/pixel.gif?type=pageView&clientId=<client identifier>&siteId=<site identifier>&campaignId=<campaign id>&category=<page category>" alt="">

This interface works in the same way as the JavaScript equivalent but returns a transparent 1×1 gif image (pixel). It accepts the same parameters as the JavaScript tag, URL-encoded, as GET parameters. Both HTTP and HTTPS are supported.

Click-through interface

http://tr.velocidi.com/events/click?clientId=<client identifier>&siteId=<site identifier>&type=adClick&<other parameters>&ourl=<url_encoded_destination_url>

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.

Click-through interface with Raw URL

http://tr.velocidi.com/events/click0?clientId=<client identifier>&siteId=<site identifier>&type=adClick&<other parameters>&ourl=<URL not encoded>

This method is for instances when it is not feasible to perform a URL Encode beforehand.


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 us know immediately what needs to be corrected.

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.


Browse through specific event types for your particular needs:


Custom Events

Custom events are available for addressing data collection needs that are unique to specific clients. If your business has e-commerce features that are novel or uncommon, adding custom events ensures that this behavior can be tracked and used for segmentation.

pcdp("event", "track", {
  "clientId": "0",                 // the client identifier (REQUIRED)
  "siteId": "0",                   // the client's site identifier (REQUIRED)
  "type": "custom",                // the event type (REQUIRED)
  "customType": "customType"       // the custom event type (REQUIRED)
                                   // other custom event fields can be added here