Enabling Assets Insights through DTM enabling-asset-insights-through-dtm

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our technical support periods. Find the supported versions here.

Adobe Dynamic Tag Management is a tool that activates your digital marketing tools. It is provided for free to Adobe Analytics customers. You can either customize your tracking code to enable third-party CMS solutions to use Assets Insights or you can use DTM to insert Assets Insights tags. Insights are only supported and provided for images.

CAUTION
Adobe DTM is deprecated in favor of Adobe Experience Platform and will soon reach end of life. Adobe recommends that you use Adobe Experience Platform for assets insights.

Perform these steps to enable Assets Insights through DTM:

  1. Tap/click the Experience Manager logo, and go to Tools > Assets > Insights Configuration.

  2. Configure Experience Manager instance with DTM Cloud Service

    The API token should be available once you log on to https://dtm.adobe.com and visit Account Settings from the Profile icon. This step is not required from the Assets Insights standpoint, because the integration of Experience Manager Sites with Assets Insights is still in the works.

  3. Log on to https://dtm.adobe.com, and select a Company, as appropriate.

  4. Create/Open an the existing Web Property

    • Select the Web Properties tab, and then tap/click Add Property.
    • Update the fields as appropriate, and tap/click Create Property (see documentation).

    chlimage_1-193

  5. In the Rules tab, select Page Load Rules from the navigation pane and tap/click Create New Rule.

    chlimage_1-194

  6. Expand Javascript /Third Party Tags. Then tap/click Add New Script in the Sequential HTML tab to open the Script dialog.

    chlimage_1-195

  7. Tap/click the Experience Manager logo, and go to Tools > Assets.

  8. Tap/click Insights Page Tracker, copy the tracker code, and then paste it in the Script dialog you opened in step 6. Save the changes.

    note note
    NOTE
    • AppMeasurement.js has been removed. It is expected to be available through DTM’s Adobe Analytics tool.
    • The call to assetAnalytics.dispatcher.init() is removed. The function is expected to be called once DTM’s Adobe Analytics tool finishes loading.
    • Depending on where Assets Insights Page Tracker is hosted (for example AEM, CDN and so on), the origin of the script source may require changes.
    • For AEM-hosted Page Tracker, the source should point to a publish instance using the host name of the dispatcher instance.
  9. Open https://dtm.adobe.com. Click Overview in the web property and click Add Tool or open an existing Adobe Analytics Tool. While creating the tool, you can set Configuration Method to Automatic.

    chlimage_1-196

    Select Staging/Production report suites, as appropriate.

  10. Expand Library Management, and ensure that Load Library at is set to Page Top.

    chlimage_1-197

  11. Expand Customize Page Code, and click or tap Open Editor.

    chlimage_1-198

  12. Paste the following code in the window:

    code language-java
    var sObj;
    
    if (arguments.length > 0) {
      sObj = arguments[0];
    } else {
      sObj = _satellite.getToolsByType('sc')[0].getS();
    }
    _satellite.notify('in assetAnalytics customInit');
    (function initializeAssetAnalytics() {
      if ((!!window.assetAnalytics) && (!!assetAnalytics.dispatcher)) {
        _satellite.notify('assetAnalytics ready');
        /** NOTE:
            Copy over the call to 'assetAnalytics.dispatcher.init()' from Assets Pagetracker
            Be mindful about changing the AppMeasurement object as retrieved above.
        */
        assetAnalytics.dispatcher.init(
              "",  /** RSID to send tracking-call to */
              "",  /** Tracking Server to send tracking-call to */
              "",  /** Visitor Namespace to send tracking-call to */
              "",  /** listVar to put comma-separated-list of Asset IDs for Asset Impression Events in tracking-call, e.g. 'listVar1' */
              "",  /** eVar to put Asset ID for Asset Click Events in, e.g. 'eVar3' */
              "",  /** event to include in tracking-calls for Asset Impression Events, e.g. 'event8' */
              "",  /** event to include in tracking-calls for Asset Click Events, e.g. 'event7' */
              sObj  /** [OPTIONAL] if the webpage already has an AppMeasurement object, please include the object here. If unspecified, Pagetracker Core shall create its own AppMeasurement object */
              );
        sObj.usePlugins = true;
        sObj.doPlugins = assetAnalytics.core.updateContextData;
        assetAnalytics.core.optimizedAssetInsights();
      }
      else {
        _satellite.notify('assetAnalytics not available. Consider updating the Custom Page Code', 4);
      }
    })();
    
    • The page load rule in DTM only includes the pagetracker.js code. Any assetAnalytics fields are considered as overrides for default values. They are not required by default.

    • The code calls assetAnalytics.dispatcher.init() after making sure that _satellite.getToolsByType('sc')[0].getS() is initialized and assetAnalytics,dispatcher.init is available. Therefore, you can skip adding it in step 11.

    • As indicated in comments within the Insights Page Tracker code (Tools > Assets > Insights Page Tracker), when Page Tracker does not create an AppMeasurement object, the first three arguments (RSID, Tracking Server, and Visitor Namespace) are irrelevant. Empty strings are passed instead to highlight this.

      The remaining arguments correspond to what is configured in the Insights Configuration page (Tools > Assets > Insights Configuration).

    • The AppMeasurement object is retrieved by querying satelliteLib for all available SiteCatalyst engines. If multiple tags are configured, change the index of the array selector appropriately. Entries in the array are ordered as per SiteCatalyst tools available in the DTM interface.

  13. Save and close the Code Editor window, and then save the changes in the Tool configuration.

  14. In the Approvals tab, approve both the pending approvals. The DTM tag is ready for insertion in your web page. For details on how to insert DTM tags in web pages, see archived page about integrating DTM in custom page templates.

recommendation-more-help
4452738f-2bdf-4cd4-9b45-905a69d607ad