Skip to content

This repository hosts a sample application designed to track and report asset usage references across Adobe Experience Manager (AEM) Sites. It helps in identifying where and how assets are utilized within the AEM ecosystem, providing insights into their distribution and usage across pages.

License

Notifications You must be signed in to change notification settings

Adobe-Marketing-Cloud/assets-usage-tracking

Repository files navigation

Assets Usage Tracking

This project is a sample application that demonstrates how to use the Adobe Experience Platform to track assets usage in a helix site. The application provides a report of all the assets used in the site along with important information such as

  • List of all the assets used in the site
  • If any expired asset is being used
  • If there are mismatch between the asset tag and tag applied on the page
  • How many times the asset is used in the site
  • On which pages the asset is used
  • Top Used Asset

The application is built using the Adobe I/O App Builder and uses the Adobe I/O Runtime to host the application and the Adobe Experience Platform SDK to track assets.

Accessing the Tool

The tool can be accessed via the following URL:

https://experience.adobe.com/?devMode=true#/custom-apps/?localDevUrl=https://288650-edsassettracker.adobeio-static.net/index.html?hlxUrl=https://demo-custom-as-config--franklin-assets-selector--hlxsites.hlx.live

where hlxUrl is the URL of the site for which you want to track assets.

prerequisites

To Track Usual Assets Usage, you need to have the following indexes created in your Helix Sites project:

  • assets index This will provide the list of all the assets used in the site along with their url and source category. Such as Adobe Assets, Dynamic Media Assets, Scene7 Assets etc. Sample Index Configuration:
assets-index:
    target: /assets-index.json
    properties:
      polaris-assets:
        select: a
        values: |
          match(attribute(el, 'href'), 'https:\/\/[^\/]+\/adobe\/assets\/urn:aaid:aem:.*')
      dm-next-assets:
        select: a
        values: |
          match(attribute(el, 'href'), 'https:\/\/[^\/]+\/adobe\/dynamicmedia\/deliver\/urn:aaid:aem:.*')
      scene7-assets:
        select: a
        values: |
          match(attribute(el, 'href'), 'https:\/\/.*scene7.com\/is\/image\/.*')
  • query index This is in general the default index in the Helix Sites project which provides the list of all the pages in the site. This index needs to be enabled with metadata property tags to provide the information tags applied on the page. Sample Index Configuration:
site:
    target: /query-index.json
    properties:
      tags:
        select: head > meta[property="article:tag"]
        values: |
          attribute(el, 'content')

Complete sample yaml configuration can be found here

Local Run

About

This repository hosts a sample application designed to track and report asset usage references across Adobe Experience Manager (AEM) Sites. It helps in identifying where and how assets are utilized within the AEM ecosystem, providing insights into their distribution and usage across pages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •