Is it possible to have the getQueryParam Plug-in values be auto-generated or recorded into a custom page properties field for use in AEM content authoring?

Avatar

Avatar
Validate 1
Level 1
FDmAmG
Level 1

Likes

3 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 1
FDmAmG
Level 1

Likes

3 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 3
Boost 1
View profile
FDmAmG
Level 1

21-04-2021

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 

 [https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getqueryparam.html?lan...]

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!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile

Avatar
Applaud 25
Level 10
asutosh_jena
Level 10

Likes

593 likes

Total Posts

705 posts

Correct reply

207 solutions
Top badges earned
Applaud 25
Give Back 100
Boost 500
Affirm 100
Ignite 1
View profile
asutosh_jena
Level 10

21-04-2021

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!

Answers (0)