Last updated

Syncing

In order for a data provider to send cookie-based audience data to MediaMath, there must be a user sync process in place. This means that the provider can refer to a user by a MediaMath Unique User ID (MM UUID).

User syncing is handled via a sync tag (also known as a sync pixel). This tag is placed by the data provider on pages with high user traffic volumes. Strategic positioning of the tag serves to maximize the distribution of synced users.

The tag operates by first loading on a MediaMath domain (example-domain.mathtag.com) and then either redirecting to a partner domain with the MM UUID appended (image tag) or loading a partner domain asynchronously (JavaScript tag).

In all cases the JavaScript sync tag is preferred, and the image tag is provided only when JavaScript is not approved to run on the partner pages. The rendered output of the tag is a 1x1 clear gif, and the tag can be wrapped in a <div> with style="display:none" to hide it from view if required.

There are 2 macros available to the data provider for use within a sync tag URL:

NameDescriptionSample Value
[MM_UUID]MediaMath Unique User ID5f11538c-fcb6-4600-88e0-6e51bff72bbc
[MT_DC]3 letter MediaMath Data Center codeiad

Note: MT_DC is used for optimization when importing data. It references the optimal MediaMath Data Center for that user.

Sample Sync Tag

Do not use the below in production

<script type="text/javascript" src="//example-domain.mathtag.com/sync/js?exsync=//partner.com/usersync%3Fmmuuid=[MM_UUID]"></script>

Please note: MediaMath will provide a sub domain to replace “example-domain” with once an agreement permitting syncing is signed.

The [PARTNER_ID] value should be hardcoded with the partner ID provided by MediaMath.

When provided with your sync tag, there is a parameter exsync which will contain the URL you wish to direct user syncs to. This URL will receive the MediaMath Unique User ID and Data Center value via replacement of the macros [MM_UUID] and [MT_DC]. Please note that the URL provided via the exsync parameter should be single encoded.

For example, your user sync endpoint could be:

https://sync.partner.com/mediamath?user_id=[MM_UUID]&dc=[MT_DC]

after encoding, this becomes:

https%3A%2F%2Fsync.partner.com%2Fmediamath%3Fuser_id%3D%5BMM_UUID%5D%3Cdc%3D%5BMM_DC%5D

For help with encoding, see here: http://www.w3schools.com/tags/ref_urlencode.asp

append to exsync like so:

http://example-domain.mathtag.com/sync/js?sync=auto&exsync=https%3A%2F%2Fsync.partner.com%2Fmediamath%3Fuser_id%3D%5BMM_UUID%5D

JavaScript is preferred; however, you may also use a pixel tag as follows:

//example-domain.mathtag.com/sync/img?redir=https%3A%2F%2Fsync.partner.com%2Fmediamath%3Fuser_id%3D%5BMM_UUID%5D
	

Please note: MediaMath will provide a sub domain to replace “example-domain” with once an agreement permitting syncing is signed.


In circumstances where the GDPR may be applicable, per the IAB Europe TCF v2 specification, you should update the sync tag you provide a digital property to include appropriate gdpr and gdpr_consent URL parameters and corresponding [GDPR] and [GDPR_CONSENT_79] macros, which you or the digital property on which you place the tag should expand. Please note, the XXXXX from the [GDPR_CONSENT_XXXXX] macro in the TCF spec should be replaced with 79, as MediaMath’s TCF vendor ID is 79.

For example:

<script type="text/javascript" src="//example-domain.mathtag.com/sync/js?gdpr=[GDPR]&gdpr_consent=[GDPR_CONSENT_79]&exsync=//partner.com/usersync%3Fmmuuid=[MM_UUID]"></script>

Where MediaMath receives gdpr and gdpr_consent URL parameters with populated values, we will append those URL parameters and values to the URL you provide in the exsync parameter when we call it.

us_privacy URL Parameter Support

MediaMath’s sync tags are configured to receive the us_privacy URL parameter and corresponding value per the IAB US Privacy String technical specification. You can instruct the digital properties on which you place the sync tag that they can append and populate the value associated with this parameter should they wish.

Where MediaMath receives us_privacy URL parameter with a populated value, we will append that URL parameter and value to the URL you provide in the exsync parameter when we call it.