Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

How to maintain a track of users who have downloaded an asset?

Avatar

Level 2

I need to keep track of users who have downloaded an asset in AEM and send out notification emails to those users when the asset is expired. Can anyone help me with a way out?

AEM version: 6.1

Many thanks. 

19 Replies

Avatar

Level 10

We are checking internally to see if there is an example similar to this.

Avatar

Level 10

I am not sure that this can be done ootb. I am checking on this - however - i suspect that a custom AEM Service would need to be written. You may have to read the session. Something like:

session - AEM - get current UserId - Stack Overflow

Avatar

Level 2

Thanks for your response smacdonald2008

As you've suggested, If we write a custom AEM service, where should I store the data? Do I need to maintain an external database? or is there any provision in AEM to hold the data about the asset ID (SHA) and the user ID (Email ID in my case).

The other option that I'm hearing around is, using adobe analytics. Could you please advise if implementing adobe analytics is a recommended approach? If so, do we have any API to pragmatically query and fetch the data that I would need?

Avatar

Level 10

OOTB notifications are sent to the person who upload the assets.

You would have customize the implementation for emails.

https://helpx.adobe.com/in/experience-manager/6-3/assets/using/drm.html#Assetexpiration

Avatar

Level 8

Hi,

"Asset downloads" section  in link Asset Reports has something related to your case.

Not sure if you are looking for something similar.

Avatar

Level 2

thanks for your input cquser1

Asset reports would give me the information ONLY about how many times the asset has been downloaded. But I need the information about the users who have downloaded the asset.

Avatar

Level 10

Do you plan to collect the information on the server itself or from the website where both content and the asset are cached in Dispatcher/CDN and the request wouldn't even go to the server?

Asset Reports might work fine if the use-case is on server itself but if it is cached then you would need to use Analytics solution- Google Analytics/Adobe Analytics (may or may not use a Tag Management solution) to tag the specific download links s.tl() or trackLinks(...) and collect the specific user information in analytics database. You could integrate Analytics data with AEM or just pull the required information from Analytics and feed it to AEM for sending mails or even use a third party system for sending mails. Within AEM, your custom service would periodically check expiry of assets and notify the appropriate users accordingly.

There are other 3rd party tools available for tracking/monitoring sites which can collect the user information but for checking asset expiry, it has to be within AEM assuming that you use AEM-DAM.

Last but not least, keep PII and GDPR in mind while collecting the user info.

Avatar

Level 2

Thanks for the detailed explanation gauravb10066713​.

I'm using AEM DAM and I just need to store the email ID of the user who download certain type of assets from a brandportal.

I already have an adobe analytics account. So, I would prefer to go with the adobe analytics as a solution. But, how would my custom service get information back from analytics? is there a way to query analytics just like how we query a database?

Avatar

Administrator

Not sure about AEM 6.1 but from AEM 6.2 for sure, Asset Reports is use to generate reports for various events related to assets in Adobe Experience Manager (AEM) Assets. AEM administrators can generate reports of the following events:

  • Asset uploads
  • Asset downloads
  • Asset expiration
  • Modification of assets
  • Publishing of assets

Link: Asset Reports



Kautuk Sahni

Avatar

Level 2

will asset reports provide information about the user who downloaded the asset? 

Avatar

Level 10

Well, I'm aware of a solution that would work in AEM Sites-Adobe Analytics integration or AEM-Launch integration but with Brand Portal my knowledge is very limited and the solution might get more complicated since you want to track downloads from brand portal which could be with different personas (guest users who may not be logged-in, admin etc.). I assume there is a connector for integrating Adobe Analytics with Brand Portal and AEM Assets. Per my limited knowledge, you would definitely have to do bunch of customization to make it happen. Per Brand Portal's roadmap, the solution should be feasible -https://helpx.adobe.com/content/dam/help/en/experience-manager/kt/assets/using/brand-portal-article-...

Once you have AEM-Analytics configuration in place (check below mentioned artifacts), you could use Analytics API to pull in required email ids via pre-generated reports or workspace reports or some other way, marry it with Brand Portal assets data, feed it to Assets reporting API unless Brand Portal has its own reporting dashboard/API to show reports. This way you wouldn't have to save email ids in CRX and would have a clean solution.

Yes, you could call Analytics API using REST client, check below. You could use Swagger to get the contract/testing

Analytics API-

GitHub - AdobeDocs/analytics-2.0-apis: Documentation for the Adobe Analytics 2.0 APIs

GitHub - AdobeDocs/analytics-1.4-apis: Documentation and helpful resources for calling the Analytics...

AEM-Adobe Analytics integration (or Launch integration) links-

GitHub - johnwight/Configure-AEM-with-Launch-and-Analytics: Connect your Adobe Experience Manager In...

Adobe Experience Manager Help | Understanding AEM Integration with Launch By Adobe, Analytics and Ta...

Integrating with Adobe Analytics

I don't see the user information option available OOB in download asset report which means you would have to customize the OOB functionality to add email ids or other fields.

-- Created By is available OOB

1671103_pastedImage_5.png

HTH

Avatar

Level 3

srkwritez​ did you find any solution for this use case?

Avatar

Level 2

Yes ajinkayk62582531​, I have used adobe analytics to capture this information. If you would like to go with the same solution, please be cautious that adobe wouldn't let you store this information for more than certain period of time (typically 36 months) due to compliance reasons.

Hope this helps. Please let me know if you need any additional information .

Thanks,

Sai.

Avatar

Level 3

we are not using adobe analytics. is there any other way to get this information in aem ?

Avatar

Community Advisor

Store user information in asset metadata, which you can get in asset report. Map this metadata field with custom column.

Avatar

Level 2

You can go for an external database, preferably  database as a service. Alternatively, you can store the information in an AEM node, but the node might eventually become too heavy as the users keep downloading the asset.

Thanks,

Sai.

Avatar

Community Advisor

Hi Ajinkay,

did you find any solution for this ?

Thanks,

Avatar

Level 3

yes,@nitinjl, I just overrode the download.js file and from sucesshandler of  downloadasset servlet call a just gave call to my custom servlet and got userid by using resourceresolver.getUserId method & stored it in the particular asset's metadata node.