Standard Events

With the EdgeTag platform, we aim to minimize friction for both customers and developers as much as possible.

With that in mind, we created standard events that support the idea of writing code once, and then you can add as many channels/apps/plugins as you would like without changes to payloads. All channels receive the same payload, and we perform transformations for you both on the browser and the server in real-time. This also allows us to make sure that when a channel introduces a change, we handle it for you.

All parameters are optional, except those marked as required. We will generate an eventId automatically for you.

You can also add additional properties to the standard payload, but keep in mind that some channels will not support it.

circle-exclamation

PageView

This is the default pixel tracking page for visits.

edgetag('tag', 'PageView')

ViewContent

A visit to a web page you care about (for example, a product page or landing page). ViewContent tells you if someone visits a web page's URL, but not what they see or do on that page.

Name
Type
Required
Description

currency

string

no

The currency for the value specified

value

number

no

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

no

A list of products or items related to this event

edgetag('tag', 'ViewContent', {
  currency: 'USD',
  value: 10.50,
  contents: [{
    id: '123123123',
    quantity: 1,
    item_price: 10.50,
    title: 'Summer Fun',
    category: 'bracelets',
    image: 'https://mysite.com/product/fun-main.jpg',
    url: 'https://mysite.com/summer-fun'
  }]
})

AddToCart

When a product is added to the shopping cart.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

checkoutUrl

string

No

Url to go to the checkout page

RemoveFromCart

When a product is removed from the shopping cart.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

checkoutUrl

string

No

Url to go to the checkout page

InitiateCheckout

When a person enters the checkout flow before completing the checkout process.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

checkoutUrl

string

No

Url to go to the checkout page

AddShippingInfo

When the user has submitted their shipping information.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

AddPaymentInfo

When payment information is added to the checkout flow.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

Purchase

When a purchase is made or the checkout flow is completed.

circle-info

We suggest that for the Purchase event, you provide eventId which matches orderId. This way, if you are sending Purchase events from any other system, channels can de-duplicate them.

Name
Type
Required
Description

currency

string

Yes

The currency for the value specified

value

number

Yes

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

orderId

string

Yes

The order ID for the transaction.

discounts

No

The discount codes utilized for the transaction

Subscribe

When a person applies to start a paid subscription for a product or service you offer.

Name
Type
Required
Description

currency

string

No

The currency for the value specified

value

number

No

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

sourceId

string

No

The unique identifier of the sign-up source.

When a search is made.

Name
Tyep
Required
Description

currency

string

No

The currency for the value specified

value

number

No

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

contents

No

A list of products or items related to this event

search

string

No

A search query made by a user.

Lead

When a sign-up is completed.

Name
Type
Required
Description

currency

string

No

The currency for the value specified

value

number

No

A numeric value associated with this event. This could be a monetary value or a value in some other metric.

name

string

No

Title of the product/page

category

string

No

Category of the Item.

Type Definitions

Content

Name
Type
Required
Description

id

string

Yes

Id of the Item. Like Product ID

quantity

number

Yes

Quantity of the Item.

item_price

number

Yes

Final price per unit of the content/product.

variantId

string

No

Variation Id of the Item. Required if variant id is used as content id for any channel

sku

string

No

SKU of the Item. Required if sku is used as content id for any channel

title

string

No

Title of the listed Item.

description

string

No

Product description used for the item.

category

string

No

Category of the Item. Comma separated

brand

string

No

Brand of the Item.

type

product | product_group

No

Type of the item.

image

string

No

Image URL of this Item.

url

string

No

URL of this Item.

Discount

Name
Type
Required
Description

code

string

Yes

Code that was applied for the discount

type

FLAT | PERCENTAGE

No

What was the discount type: flat amount or percentage based

value

string

No

Value that was applied for that discount code

Additional Parameters

You can use the parameters below with every event. You need to add them in the payload/data parameter.

Name
Type
Description

eventId

string

By default we generate a unique id for every event. If you want to pass your own id, you can use this parameter.

skipIPAddress

boolean

You can use this flag if you are sending offline event where you do not know IP of the user.

source

online | offline

Define source of the event. By default we send online.

skipTransformation

boolean

If you pass this flag, we will not transform/normalize your data. You will need to take care of this as we will just pass through the data!

Last updated

Was this helpful?