Placing measurement tags

Codes (JavaScript tracking snippets) placed across all pages on a site, in order to recognize users who visit the website and provide web customer service, are called measurement tags on CODE Marketing cloud. This page explains how to place measurement tags on the site.

Measurement tag content

The content of measurement tags is as follows.

<script async src="@TAG_URL"></script>
<script>
  window._cq = window._cq || [];
  function _cc(){_cq.push(arguments);}
  _cc('load', '@ACCOUNT_ID', '@SITE_ID');
</script>
  • Note that character strings which start with @ are unique values for each site. For further details, see the “Checking tags” screenin the CODE Marketing cloud Admin Screen.
Character string Overview Example
@TAG_URL js Library //asset.codemarketing.cloud/js-sdk/code-1.0.min.js
@ACCOUNT_ID Account ID 0001
@SITE_ID Site ID 0122

Measurement tag pasting position

The following pasting positions are recommended.

  1. This code should be placed near the front of the <head> tag, added before other scripts or CSS tags.
  2. If this proves difficult, it should be placed near the front of the <body> tag, added before other scripts or CSS tags.

Measurement tag types

CODE Marketing cloud offers tags for production environments and tags for testing environments depending on measurement tag usage.

Operating differences between the tags for production environments and the tags for test environments

  Tags for production environments Tags for test environments
Targeting Yes Yes
Creative display Select and display from running creatives only Select and display from all creatives, regardless of whether they are running or suspended
Send event Yes No
Apply update Only when the “Publish production environment (update)” button is pressed Immediately

If you want to update a campaign setting that has already been published, we recommend applying settings to the production site at the appropriate time after configuring and checking targeting conditions and creatives in a test environment.

管理画面からの設定更新反映のライフサイクル