Edit in GitHubLog an issue

Implement Target without a tag manager

Information about implementing Adobe Target without using a tag manager or tags in Adobe Experience Platform.

To access the Implementation page, click Administration > Implementation.

You can specify the following settings on this page:

  • Account details
  • Implementation methods
  • Profile API
  • Debugger tools
  • Privacy

Account details#

You can view the following account details. These settings cannot be changed.

SettingDescription
Client CodeThe client code is a client-specific sequence of characters often required when using the Target APIs.
IMS Organization IDThis ID ties your implementation to your Adobe Experience Cloud account.
On-Device DecisioningTo enable on-device decisioning, slide the toggle to the "on" position.
On-device decisioning lets you cache your A/B and Experience Targeting (XT) campaigns on your server and perform in-memory decisioning at near-zero latency. For more information, see Introduction to on-device decisioning.
Include all existing on-device decisioning qualified activities in the artifact(Conditional) This option displays if you enable on-device decisioning.
Slide the toggle to the "on" position if you want all your live Target activities that qualify for on-device decisioning to be automatically included in the artifact.
Leaving this toggle off means you must re-create and activate any on-device decisioning activities in order for them to be included in the generated rules artifact.

Implementation methods#

The following settings can be configured in the Implementation methods panel:

Global settings#

SettingDescription
Page load enabled (Auto-create global mboxSelect whether to embed the global mbox call in the at.js file to automatically fire on each page load.
Global mboxSelect a name for the global mbox. By default, this name is target-global-mbox.
Special characters, including ampersands (&), can be used in mbox names with at.js.
Timeout (seconds)If Target does not respond with content within the defined period, the server call times out and default content is displayed. Additional calls continue to be attempted during the visitor's session. The default is 5 seconds.
The at.js library uses the timeout setting in XMLHttpRequest. The timeout starts when the request is fired and stops when Target gets a response from the server. For more information, see XMLHttpRequest.timeout on the Mozilla Developer Network.
If the specified timeout occurs before receiving the response, default content is shown and the visitor might be counted as a participant in an activity because all data collection happens on the Target edge. If the request reaches the Target edge, the visitor is counted.
Consider the following when configuring the timeout setting:
  • If the value is too low, users might see default content most of the time, although the visitor could be counted as a participant in the activity.
  • If the value is too high, visitors might see blank regions on your web page or blank pages if you use body hiding for extended periods of time.
To get a better understanding of mbox response times, look at the Network tab in your browser's Developer Tools. You can also use third-party web performance monitoring tools, such as Catchpoint.
Note: The visitorApiTimeout setting ensures that Target doesn't wait for the Visitor API response for too long. This setting and the Timeout setting for at.js described here do not affect each other.
Profile LifetimeThis setting determines how long visitor profiles are stored. By default, profiles are stored for two weeks. This setting can be increased up to 90 days.
To change the Profile Lifetime setting, contact Client Care.

Main implementation method#

To download the desired at.js version, click the appropriate Download button.

To edit at.js settings, click Edit next to the desired at.js version.

In addition to the settings explained above, the following specific at.js settings are also available:

SettingDescription
Custom Library HeaderAdd any custom JavaScript to include at the top of the library.
Custom Library FooterAdd any custom JavaScript to include at the bottom of the library.

Profile API#

Enable or disable authentication for batch updates via API and generate a profile authentication token.

For more information, see Profile API settings.

Debugger tools#

Generate an authorization token to use advanced Target debugging tools. Click Generate New Authentication Token.

Generate New Authentication Token

Privacy#

These settings allow you to use Target in compliance with applicable data privacy laws.

Choose the desired setting from the Obfuscate Visitor IP address drop-down list:

  • Last octet obfuscation
  • Entire IP obfuscation
  • None

For more information, see Privacy.

Download at.js#

Instructions to download the library using the Target interface or the Download API.

Download at.js using the Target interface#

To download at.js from the Target interface:

  1. Click Administration > Implementation.
  2. From the Implementation Methods section, click the Download button next to the desired at.js version.

Download at.js using the Target Download API#

To download at.js using the API.

  1. Get your client code.

    Your client code is available at the top of the Administration > Implementation page of the Target interface.

  2. Get your admin number.

    Load this URL:

    Copied to your clipboard
    https://admin.testandtarget.omniture.com/rest/v1/endpoint/<varname>client code</varname>

    Replace client code with the client code from Step 1.

    The result of loading this URL should look similar to the following example:

    Copied to your clipboard
    1{
    2 "api": "https://admin6.testandtarget.omniture.com/admin/rest/v1"
    3}

    In this example, "6" is the admin number.

  3. Download at.js.

    Load this URL with the following structure. Loading this URL starts the download of your customized at.js file.

    Copied to your clipboard
    https://admin<varname>admin number</varname>.testandtarget.omniture.com/admin/rest/v1/libraries/atjs/download?client=<varname>client code</varname>&version=<version number>
    • Replace admin number with your admin number.
    • Replace client code with the client code from Step 1.
    • Replace version number with the desired at.js version number (for example, 2.2).

at.js implementation#

at.js should be implemented in the <head> element of every page of your website.

A typical implementation of Target not using a tag manager, such as tags in Adobe Experience Platform looks like this:

Copied to your clipboard
1<!doctype html>
2<html>
3<head>
4 <meta charset="utf-8">
5 <title>Title of the Page</title>
6 <!--Preconnect and DNS-Prefetch to improve page load time-->
7 <link rel="preconnect" href="//<client code>.tt.omtrdc.net">
8 <link rel="dns-prefetch" href="//<client code>.tt.omtrdc.net">
9 <!--/Preconnect and DNS-Prefetch-->
10 <!--Data Layer to enable rich data collection and targeting-->
11 <script>
12 var digitalData = {
13 "page": {
14 "pageInfo": {
15 "pageName": "Home"
16 }
17 }
18 };
19 </script>
20 <!--/Data Layer-->
21 <!-- targetPageParams(), targetPageParamsAll(), Data Providers or targetGlobalSettings() functions to enrich the visitor profile or modify the library settings-->
22 <script>
23 targetPageParams = function() {
24 return {
25 "a": 1,
26 "b": 2,
27 "pageName": digitalData.page.pageInfo.pageName,
28 "profile": {
29 "age": 26,
30 "country": {
31 "city": "San Francisco"
32 }
33 }
34 };
35 };
36 </script>
37 <!--/targetPageParams()-->
38
39 <!--jQuery or other helper libraries should be implemented before at.js if you would like to use their methods in Target-->
40 <script src="jquery-3.3.1.min.js"></script>
41 <!--/jQuery-->
42 <!--Target's JavaScript SDK, at.js-->
43 <script src="at.js"></script>
44 <!--/at.js-->
45</head>
46<body>
47 The default content of the page
48</body>
49</html>

Consider the following important notes:

  • The HTML5 Doctype (for example, <!doctype html>) should be used. Unsupported or older doctypes could result in Target not being able to make a request.
  • Preconnect and Prefetch are options that might help your web pages load faster. If you use these configurations, ensure that you replace <client code> with your own client code, which you can obtain from the Administration > **Implementation page.
  • If you have a data layer, it is optimal to define as much of it as possible in the <head> of your pages before at.js loads. This placement provides the maximum ability to use this information in Target for personalization.
  • Special Target functions, such as targetPageParams(), targetPageParamsAll(), Data Providers, and targetGlobalSettings() should be defined after your data layer and before at.js loads. Alternatively, these functions could be saved in the Library Header section of the Edit at.js Settings page and saved as part of the at.js library itself. For more information on these functions, see at.js functions.
  • If you use JavaScript helper libraries, such as jQuery, include them before Target so you can use their syntax and methods when building Target experiences.
  • Include at.js in the <head> of your pages.

Track conversions#

The Order Confirmation mbox records details about orders on your site and allows reporting based on revenue and orders. The Order Confirmation mbox can also drive recommendation algorithms, such as "People who bought product x also bought product y."

  1. In your order details page, insert the mbox script following the model below.

  2. Replace the WORDS IN CAPITAL LETTERS with either dynamic or static values from your catalog.

    Tip: You can also pass order information in any mbox (it does not need to be named orderConfirmPage). You can also pass order information in multiple mboxes within the same campaign.

    Copied to your clipboard
    1<script type="text/javascript">
    2adobe.target.trackEvent({
    3 "mbox": "orderConfirmPage",
    4 "params":{
    5 "orderId": "ORDER ID FROM YOUR ORDER PAGE",
    6 "orderTotal": "ORDER TOTAL FROM YOUR ORDER PAGE",
    7 "productPurchasedId": "PRODUCT ID FROM YOUR ORDER PAGE, PRODUCT ID2, PRODUCT ID3"
    8 }
    9});
    10</script>

The Order Confirmation mbox uses the following parameters:

ParameterDescription
orderIdUnique value to identify an order for conversion counting.
The orderId must be unique. Duplicate orders are ignored in reports.
orderTotalMonetary value of the purchase.
Do not pass the currency symbol. Use a decimal point (not a comma) to indicate decimal values.
productPurchasedId (Optional)Comma-separated list of product IDs purchased in the order.
These product IDs display in the audit report to support additional reporting analysis.
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell my personal information
  • AdChoices
Copyright © 2022 Adobe. All rights reserved.