Adobe Analytics & Foundation
This article describes how to add Adobe Analytics tracking to a Higher Logic Vanilla community using a Foundation theme.
Adobe Analytics is typically implemented using Adobe Tags, formerly known as Adobe Launch. Adobe Tags loads the tracking configuration supplied and maintained by your organization's Adobe administrator or analytics team.
You do not need to be an Adobe Analytics administrator to complete the Vanilla portion of this setup. Before getting started, ask your Adobe administrator for the Production Adobe Tags embed code or script URL and the domains that need to be allowed by your community's security settings.
https://assets.adobedtm.com/EXAMPLE_ORG_ID/EXAMPLE_PROPERTY_ID/launch-EXAMPLE_BUILD_ID.min.js
The values in this example are placeholders. Use the exact Production URL provided by your Adobe administrator.
Your Adobe administrator is responsible for configuring and publishing the Adobe tracking rules. The steps below focus on adding that implementation to Vanilla and confirming that it is running.
Add Adobe Tags to your Style Guide
Adobe Analytics should be added to the Style Guide applied to the community so that it can run throughout the site.
- Access the Dashboard and navigate to Appearance > Branding & Assets > Style Guides.
- Find the Style Guide currently used by your community and select Edit.
- Add the JavaScript that loads your Production Adobe Tags library, using the URL supplied by your Adobe administrator.
Adobe commonly provides an embed code containing a URL hosted on assets.adobedtm.com. Because the Style Guide JavaScript tab accepts JavaScript rather than HTML, an Adobe <script> tag should not simply be pasted into the field as-is. Your implementation should use JavaScript to load the Adobe Tags script into the page.
A Vanilla-friendly implementation can look like this:
// Replace this example URL with the Production Adobe Tags URL
// provided by your Adobe administrator.
var head = document.querySelector("head");
var nonceElement = document.querySelector("[nonce]");
var nonce =
nonceElement &&
(nonceElement.nonce || nonceElement.getAttribute("nonce"));
var scriptTag = document.createElement("script");
scriptTag.async = true;
scriptTag.src =
"https://assets.adobedtm.com/EXAMPLE_ORG_ID/EXAMPLE_PROPERTY_ID/launch-EXAMPLE_BUILD_ID.min.js";
if (nonce) {
scriptTag.setAttribute("nonce", nonce);
}
head.appendChild(scriptTag);
Make sure you are using the Production Adobe Tags environment on a production community. Development and staging Adobe environments should only be used for testing.
Allow the Adobe domains
Allow the JavaScript source domains required by your Adobe implementation.
- In the Dashboard, navigate to Settings > Technical > Security.
- In Content Security Domains, add the JavaScript source domains supplied by your Adobe administrator, one domain per line. Enter domain names without a protocol or path.
Use Content Security Domains, the lower field shown above. The Adobe Tags library commonly loads from assets.adobedtm.com; confirm the exact script domains with your Adobe administrator.
3. Save your changes.
Trusted Domains is a separate setting for redirects and embedding. It is not the setting used to allow Adobe JavaScript to load.
Allow only the script domains your implementation requires. If the browser reports another Content Security Policy restriction, review the blocked request with your Adobe administrator or security team before changing security settings.
Tracking navigation within Vanilla
Foundation communities can navigate between pages without a full browser refresh. Analytics that tracks only traditional page loads can miss these page changes.
We recommend using Vanilla’s window.onPageView() callback to connect supported page changes to your Adobe implementation. Your Adobe administrator or implementation team must configure the corresponding Adobe rule or event handling. Loading the Adobe Tags library alone does not create that connection.
Your team may use a custom URL-change rule instead. Whichever approach it uses, verify one page view on the initial page load and one for each subsequent page change that should count as a page view. Confirm that the initial page view is handled even if the integration becomes ready after the page loads.
Adobe rule configuration is managed by your Adobe administrator or implementation team. These instructions cover adding the implementation to Vanilla and checking its operation.
There should only be one system responsible for sending each Adobe page view. If Adobe automatically sends a page view and a separate customization sends the same event again, Adobe Analytics may report duplicate traffic.
Allow Third-Party Script Execution
Most implementations should first be tested using the required domains in the security settings described above.
Vanilla also provides an Allow Third-Party Script Execution setting for integrations that dynamically load additional scripts. This setting is not something that should automatically be enabled for every Adobe implementation.
If the Adobe Tags library loads but the browser reports that one of its required scripts is being blocked by Content Security Policy, work with your Adobe administrator, security team, or Vanilla Support to determine whether this setting is necessary.
Allow Third-Party Script Execution changes how the community's Content Security Policy trusts scripts that load other scripts. Review the setting with your organization's security team before enabling it.
Confirm that Adobe Analytics is running
You can perform a basic test from the browser even if you do not have access to Adobe Analytics.
Confirm that Adobe Tags loads
- Open your community in a browser and open the browser's Developer Tools.
- Select the Network tab and refresh the page.
- Search the Network requests for
adobedtm.
You should see a successful request for the Adobe Tags library.
If there is no Adobe Tags request, first confirm that you edited the Style Guide currently assigned to the community. You can also check the browser Console for a Content Security Policy message, which may indicate that an Adobe domain still needs to be allowed.
Confirm that Adobe Web SDK is sending data
These checks apply to implementations that use Adobe Experience Platform Web SDK. If your Adobe implementation uses AppMeasurement or the Adobe Analytics tag extension, ask your Adobe administrator to use the appropriate checks in Adobe’s debugging guide.
- In the browser's Network tab, search for
/ee/. - Load a page in the community and look for an
interact request. - Select the request and confirm that it completed successfully. A 200 OK response means that Adobe's collection service received the request.
NOTE: Adobe Web SDK can use /ee/ requests for more than page views, so a successful request confirms that data is reaching Adobe but does not by itself confirm how the event will appear in Adobe Analytics. Your Adobe administrator or analytics team should complete that final verification in Adobe.
Test navigation between pages
Keep the Network tab open and click from one community page to another without manually refreshing the browser.
A new Adobe page-view request should appear for the new page. Try this with a few common areas of your community, such as moving from the Home page to a Category and then opening a Discussion.
You should see one page view for each page you visit.
If tracking works after manually refreshing a page but not when clicking between pages in Vanilla, ask your Adobe administrator to check how the implementation detects in-app navigation. Use Vanilla’s window.onPageView() callback or a validated custom URL-change rule.
If two page views appear for a single navigation, more than one Adobe rule or customization may be sending the same event.
Confirm reporting with your Adobe administrator
A successful Network request confirms that the browser was able to load Adobe Tags and send information to Adobe's collection service. It does not confirm that the information ultimately appeared in the correct Adobe Analytics report.
After completing the Vanilla-side tests, ask your Adobe administrator or analytics team to confirm that page views are arriving in the expected Adobe configuration and that the page URL or page name is being recorded correctly.
Adobe administrators can also use tools such as Adobe Experience Platform Debugger or Assurance when they need to trace an event beyond what is visible in the browser.
Troubleshooting
Confirm that the correct Style Guide is active and that the Adobe Tags loader has been added to its JavaScript tab. If the browser Console reports a Content Security Policy error, compare the blocked domain with the domains configured under Settings > Technical > Security.
This usually requires help from the Adobe administrator. The Adobe property may not have been published, the page-view rule may not be configured, or a consent-management system may be preventing analytics from running.
The implementation may be detecting traditional page loads but missing Vanilla’s in-app navigation. Ask your Adobe administrator to connect page-view tracking to Vanilla’s window.onPageView() callback or verify the custom URL-change rule used by your implementation.
If one page visit produces two Adobe page-view requests, check whether Adobe Tags is already sending a page view automatically in addition to a separate Vanilla customization. Only one implementation should own the page-view event.
Your site may use more than one Style Guide. For example, different subcommunities, products, languages, or other areas of the site can have their own Style Guide.
JavaScript added to one Style Guide is associated only with that Style Guide. If the Adobe Tags script has only been added to one of the Style Guides used by your site, Adobe may load correctly in one area but not another.
If tracking appears to work inconsistently, first check which Style Guide is applied to the affected area. In the Dashboard, use Site Structure to review the Style Guides currently in use across your community and where they are assigned.
For seeing what Style Guide the current page is using, check in the admin bar at the top of the page on the right-hand side.
If multiple Style Guides are used, make sure the Adobe Tags implementation has been added to each Style Guide where Adobe Analytics should run.
Related resources
For related Vanilla setup and security guidance, see the following Vanilla documentation:
- Google Analytics (gtag.js) & Foundation
- Google Tag Manager Setup
- Third-Party Scripts & Foundation
- Allow Third-Party Script Execution
For Adobe implementation guidance, start with Implement Adobe Analytics using the Adobe Experience Platform Web SDK. This gives Adobe administrators the best overview of the current approaches available for sending data to Adobe Analytics.
For organizations using Adobe Tags, Install and configure the Adobe Experience Platform Web SDK tag extension explains how the Web SDK extension, datastream, and Adobe Tags property are connected.
Adobe's Set up Adobe Analytics with Adobe Experience Platform Web SDK guide covers the Adobe Analytics configuration itself and includes information about validating that Analytics is receiving the expected data.
For troubleshooting and validation, see the Adobe Experience Platform Debugger overview. Adobe Experience Platform Debugger can help an Adobe administrator inspect Adobe Tags, Web SDK, and Adobe Analytics activity in the browser.