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
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:
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?
OOTB notifications are sent to the person who upload the assets.
You would have customize the implementation for emails.
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.
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.
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?
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:
Link: Asset Reports
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
AEM-Adobe Analytics integration (or Launch integration) links-
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
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 .
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.
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.