Documentation
  • Overview
  • Concepts
    • Personas
    • Creative
    • Activation
    • Campaigns
    • Measurement
  • Getting Started
    • Overview
    • Connecting Your Data
    • Persona Generation
    • Execute A Campaign
    • Measure Your Success
    • Harness the power of AI
  • Connections & Data
    • Overview
    • Data Sources
      • Act-On
      • Act CRM
      • Bing Ads
      • Facebook Ads
      • Google Ads
      • Google Analytics
      • LinkedIn Ads
      • Klayvio
      • Shopify
      • Sage Intacct
      • Salesforce
      • Salesforce Marketing
      • Hubspot
      • Mailchimp
      • Salesforce Pardot
      • Snapchat Ads
      • Sugar CRM
      • Twitter Ads
      • Quickbooks Online
      • Xero
      • Youtube Analytics
      • Zendesk
    • Jobs Portal
    • Monitoring & Alerts
    • Troubleshooting
    • BI Tools
      • Tableau
      • PowerBI
      • Data Studio
    • Reference
  • Event Tracking
    • Overview
    • Installation
    • Sending Events
    • FAQ's
    • Reference
  • Data Modeling
    • Overview
  • Configuration
    • Settings
      • Preferences
      • Notifications
    • Administration
      • Roles & Permissions
      • User Management
    • Integrations
      • Zapier
      • Slack
      • Microsoft Teams
    • Developers
      • Build On SWARM
      • Access Credentials
      • Webhooks
  • Reference
    • Glossary
    • Metrics & KPIS
    • Security
      • Privacy Policy
  • Resources
    • API Documentation
    • Release Notes
    • Status Page
    • Help Center
    • Product Feedback
Powered by GitBook
On this page
  • CDN
  • Event Types
  • Event Data Schema
  • Snippet Error Codes
  • Events.js Library is tested and supports the following browsers:
  • Open Source Libraries
  • JS-Cookie
  • Device-UUID
  • UUIDV4
  • Query-String
  • Unfetch/Polyfill
  1. Event Tracking

Reference

This page provides reference details that may be helpful when installing, debugging, or using the SWARM Events JS SDK.

CDN

The SWARM Events.js is available via CDN as both standard and minified versions. We recommend loading the minified version when pasting to your site to ensure the best performance.

The Latest Snippet

https://cdn.aiadvertising.com/swarm/events/events.min.js

You can also load a particular Events JS version by referencing that folder in the CDN

https://cdn.aiadvertising.com/swarm/events/1.0.0/events.min.js

Event Types

Label
Type
Description

Page

PAGE

Records when an individual views a web page

Track

TRACK

Can be used to record any type of action such as "click", "purchase", "download" and more.

Identify

IDENTIFY

Used to identify an individual user by some sort of identifier, example ID, Email, etc.

Group

GROUP

Used to identify an individual as part of a group such as an organization, a persona, etc.

Event Data Schema

All events share a common data schema - depending on the type of event and device that the event was created, some events may not have all values.

Please Note

Some values such as IP_Address are generated on the Server once SWARM receives the event data from the javascript library.

swarm_
{
  "id": "string",
  "type": "string",
  "anonymous_id": "string",
  "user_id": "string",
  "device": {},
  "url": "string",
  "referrer": "string",
  "user_agent": "string",
  "timestamp_sent": "string",
  "timestamp_received": "string",
  "version": "string",
  "data": {},
  "ip_address": {},
  "locale": {},
  "location": {},
  "network": {},
  "os": {},
  "timezone": "string"
}

Snippet Error Codes

Code
Error

500

Server Error

402

Rate Limit Exceeded

Events.js Library is tested and supports the following browsers:

  • Apple Safari

  • Google Chrome

  • Mozilla Firefox

  • Microsoft Edge

Internet Explorer Support

While the Events.js should work with Interloop Explorer 11 and later, we make no guarantees that the script will function as expected and do not support installations on Internet Explorer. We recommend that if you are using IE, you should migrate to using Microsoft Edge.

Open Source Libraries

The SWARM Events JS SDK currently uses the following open source libraries. Please see their respective documentation for additional details and source code.

JS-Cookie

Device-UUID

UUIDV4

Query-String

Unfetch/Polyfill

PreviousFAQ'sNextOverview

Last updated 3 years ago

GitHub - js-cookie/js-cookie: A simple, lightweight JavaScript API for handling browser cookiesGitHub
GitHub - biggora/device-uuid: Fast browser device uuid generation library. Written in pure JavaScript, no dependencies.GitHub
GitHub - thenativeweb/uuidv4: uuidv4 creates v4 UUIDs.GitHub
GitHub - sindresorhus/query-string: Parse and stringify URL query stringsGitHub
GitHub - developit/unfetch: 🐕 Bare minimum 500b fetch polyfill.GitHub
Logo
Logo
Logo
Logo
Logo