Trying to configure our AEM authoring to capture our campaign links as you would typically see them in Google Analytics.
Is the approach here the best way to go about it? getqueryparam implementation
We're not using Adobe Campaign. Our current internal tracking code reg ex in rule builder includes:
URL:channelZone:link / Image:description:placement:cmp
//e.g.: URL?intcmp=wsp_deals-landing-page_link_private-room-sale_deals
Is it possible to have those URL query parameters embedded or auto-generated in a field within AEM authoring when building a landing page, so that we don't need to enter manually per internal campaign? And what is the best way to go about it?
There are manual solutions available https://utmsmartmanager.com/adobe-analytics-utm-builder/ or publicly available UTM "standardizers" but want to explore integrating this capability into our AEM authoring/publishing configuration.
Thank you for the feedback!
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @FDmAmG
If I understand the requirement here, you are trying to read the values from certain parameter and store those values in AEM page properties which you want to do it only while authoring.
If this is the requirement, you can do it using the Sling Model in Java. You just need to create a model class which will read the query parameter value (whichever you want) and then set those values into AEM page property with respective name.
Now you need to ensure that this logic should work only on author instance and in edit mode, so you can add the necessary condition checks in sling model to for WCMMode.Edit and Runmode author.
Once you have the logic in place, when you open any page with edit mode and have the requried query param in the URL, the values will be automatically set in the page properties and once you publish the page, the same content will be replicated to publish instance. For validation you can open the page property and check the custom tab, you should be able to see the query param values.
Thanks!
Hi @FDmAmG
If I understand the requirement here, you are trying to read the values from certain parameter and store those values in AEM page properties which you want to do it only while authoring.
If this is the requirement, you can do it using the Sling Model in Java. You just need to create a model class which will read the query parameter value (whichever you want) and then set those values into AEM page property with respective name.
Now you need to ensure that this logic should work only on author instance and in edit mode, so you can add the necessary condition checks in sling model to for WCMMode.Edit and Runmode author.
Once you have the logic in place, when you open any page with edit mode and have the requried query param in the URL, the values will be automatically set in the page properties and once you publish the page, the same content will be replicated to publish instance. For validation you can open the page property and check the custom tab, you should be able to see the query param values.
Thanks!
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies