About Marketing Tags

With Wix Marketing Tags, site owners can embed marketing tags in their website. The supported marketing tags are:

These marketing tags enable site owners to track user activity, ad conversion rates, and more.

Note: Only one marketing tag of each type is supported per Wix site.

The Marketing Tags APIs allow your app to:

  • List marketing tags
  • Create and update marketing tags
  • Delete marketing tags

Terminology

  • Domain: Specifies which website is associated with the marketing tag.

    Note: When the site owner changes the domain of a Wix site, the embedded marketing tags won’t load anymore. To update the domain use the Upsert Marketing Tag endpoint. Currently, there is no way to sign up for notifications when a site owner changes their domain name.

  • Tracking ID: Specifies which external ID is associated with the site owner. Learn more about each tracking ID in the corresponding object description. These are the supported external IDs:

    Marketing TagExternal ID NameID Format
    Google Ads Conversion tagConversion IDAW-123456789
    Google Universal Analytics tagAnalytics IDUA-12345-1
    Google Analytics 4 tagMeasurement IDG-12345
    Yandex Metrica tagTag number123456789
    Facebook Pixel tagPixel ID123456789
    Google tagTag Manager Container IDGTM-12345
Was this helpful?
Yes
No

Example Flow: Wix Marketing Tags

This article shares a possible use case your app could support, as well as an example flow. You're certainly not limited to this use case, but it can be a helpful jumping off point as you plan your app's implementation.

Manage Marketing Tags

Your app could help site owners manage their marketing tags after they have updated their site structure. First, you’ll list the existing tags. Then your app will update the associated domains.

Step 1: List the Embedded Marketing Tags

First, your app will call the List Marketing Tags endpoint to retrieve the marketing tags that the owners have previously embedded.

Copy
1
curl -X GET \
2
https://www.wixapis.com/marketing/v1/tags \
3
-H 'Content-Type: application/json' \
4
-H 'Authorization: <AUTH>'

In the response of the call, you can see that the associated domains are out-dated, and thus the marketing tags won’t load anymore.

Copy
1
{"tags": [
2
{
3
"id": "994ba324-682c-4d81-abd6-84e4be44ba3c",
4
"type": "GOOGLE_ADS",
5
"enabled": true,
6
"google_ads": {
7
"domain": "old-domain.com",
8
"tracking_id": "AW-672490861"
9
}
10
},
11
{
12
"id": "123ba321-678c-4d81-abd6-84e4be44ba3c",
13
"type": "FACEBOOK_PIXEL",
14
"enabled": true,
15
"facebook_pixel": {
16
"domain": "old-domain.com",
17
"tracking_id": "123456789"
18
}
19
}
20
]}

Step 2: Update an Embedded Marketing Tag

Then, you’ll do a separate call of the Upsert Marketing Tag endpoint for each tag to change the associated domain. You’ll need to pass the new domain in the body of each call, as shown in the example below for the Google Ads Conversion tag.

Copy
1
curl -X POST \
2
https://www.wixapis.com/marketing/v1/tags \
3
-H 'Content-Type: application/json' \
4
-H 'Authorization: <AUTH>'
5
-d '{
6
"tag": {
7
"enabled": true,
8
"google_ads": {
9
"domain": "new-domain.com",
10
"tracking_id": "AW-672490861",
11
}
12
}
13
}'
Was this helpful?
Yes
No

Tag Object

Attributes
idstringRead-onlyformat GUID
Marketing tag ID.

typestringRead-only
7 enum supported values:
UNKNOWNGOOGLE_ADSGOOGLE_ANALYTICSYANDEX_METRICAFACEBOOK_PIXELGOOGLE_TAG_MANAGERTIKTOK_PIXEL
Marketing tag type.

enabledboolean
Whether this tag is enabled. Defaults to true.

ONE OF:


googleAdsobject
A Google Ads Conversion tag lets site owners analyze what a visitor does after clicking on a Google ad.

googleAnalyticsobject
A Google Analytics tag lets site owners track page views, where visitors are coming from, how long they stay, and what keywords they used to find the site. Both Google Universal Analytics Tags and Google Analytics 4 tags are supported.

yandexMetricaobject
A Yandex Metrica tag lets site owners build visual reports of visitor activity that helps them evaluate the performance of their marketing campaigns.

facebookPixelobject
A Facebook Pixel tag allows site owners to track Facebook ad-driven visitor activity on their site.

googleTagManagerobject
A Google tag lets site owners implement a quick and easy tag management system that keeps 3rd party code snippets organized.

tikTokPixelobject
A TikTok Pixel allows site owners to share visitor events to TikTok on their site.
Was this helpful?
Yes
No

GetList Marketing Tags

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves marketing tags given the provided filter.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Marketing Tags
Learn more about permission scopes.
Endpoint
GET
https://www.wixapis.com/marketing/v1/tags

Was this helpful?
Yes
No

PostUpsert Marketing Tag

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates or updates a marketing tag.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Marketing Tags
Learn more about permission scopes.
Endpoint
POST
https://www.wixapis.com/marketing/v1/tags

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

DeleteDelete Marketing Tag

Deprecated

This method has been replaced with DeleteMarketingTagV2, and will be removed on October 1, 2022.

Deletes a marketing tag.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Marketing Tags
Learn more about permission scopes.
Endpoint
DELETE
https://www.wixapis.com/marketing/v1/tags

Event TriggersThis method triggers the following events:
Was this helpful?
Yes
No

Marketing Tag Created

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a marketing tag is created.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.marketing.v1.tag.

slugstring
Event name. Expected created.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

createdEventobject
Event information.
Was this helpful?
Yes
No

Marketing Tag Updated

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a marketing tag is updated.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.marketing.v1.tag.

slugstring
Event name. Expected updated.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

updatedEventobject
Event information.
Was this helpful?
Yes
No

Marketing Tag Deleted

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Triggered when a marketing tag is deleted.

Event BodyEvent Body Event data is received as a JSON Web Token (JWT). It may be delayed. Be sure to verify the data was sent by Wix.
Event Data
idstring
Unique event ID. Allows clients to ignore duplicate webhooks.

entityFqdnstring
Fully qualified domain name of the entity associated with the event. Expected wix.marketing.v1.tag.

slugstring
Event name. Expected deleted.

entityIdstring
ID of the entity associated with the event.

eventTimestringformat date-time
Event timestamp.

triggeredByAnonymizeRequestboolean
Whether the event was triggered as a result of a privacy regulation application (for example, GDPR).

originatedFromstring
If present, indicates the action that triggered the event.

deletedEventstruct
Event information.
Was this helpful?
Yes
No