Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Generating Dynamic Headlines based off of information collected from Paid advertisements?

christammm
Level 2
Level 2

I'd like to personalize my website where the hero heading of my homepage will dynamically change if the visitor clicks on one of my paid advertisements on Google.

 

For example, suppose my paid ad contains :"New Cars - Compare Specs, Pricing & MPG", similar to this paid advertisement by ford.

christammm_0-1598844499342.png

 

If the visitor clicks on my paid advertisement, I'd like to build a personalized experience where the title of the paid ad is used as the heading of my hero banner on my homepage.

 

christammm_1-1598844653758.png

Would this be feasible? If so, how would I go about developing this experience?

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution
gaureshk3014423
Correct answer by
Level 9
Level 9

Hi @Alandy_Iceboats

 

This is possible using Javascript. 

Basically what you need to do is, just attach an click event on advertisement section.. on click of advertisement retrieve advertisement heading and store it in a variable.

For exdocument.getElementById("demo").onclick = function { advertisement_heading = document.getElementById("adblock").innertext;}

Now use that heading (stored in variable advertisement_heading) in your hero banner

You can write code snippet accordingly and add it in add custom code option under the modification tab.

 

gaureshk3014423_0-1599054100286.png

 

 

 

Hope this works

If you need any clarification please feel free to ask.

Thanks,

Gauresh.

View solution in original post

0 Replies
gaureshk3014423
Level 9
Level 9

Hi @Alandy_Iceboats

 

This is possible using Javascript. 

Basically what you need to do is, just attach an click event on advertisement section.. on click of advertisement retrieve advertisement heading and store it in a variable.

For exdocument.getElementById("demo").onclick = function { advertisement_heading = document.getElementById("adblock").innertext;}

Now use that heading (stored in variable advertisement_heading) in your hero banner

You can write code snippet accordingly and add it in add custom code option under modification tab.

Hope this works

If you need any clarification please feel free to ask.

Thanks,

Gauresh.

gaureshk3014423
Correct answer by
Level 9
Level 9

Hi @Alandy_Iceboats

 

This is possible using Javascript. 

Basically what you need to do is, just attach an click event on advertisement section.. on click of advertisement retrieve advertisement heading and store it in a variable.

For exdocument.getElementById("demo").onclick = function { advertisement_heading = document.getElementById("adblock").innertext;}

Now use that heading (stored in variable advertisement_heading) in your hero banner

You can write code snippet accordingly and add it in add custom code option under the modification tab.

 

gaureshk3014423_0-1599054100286.png

 

 

 

Hope this works

If you need any clarification please feel free to ask.

Thanks,

Gauresh.

View solution in original post

christammm
Level 2
Level 2
Hi Gauresh, thanks for the reply. How can I attach that click event on the paid ad section of Google? I'm not sure if Google allows users to add custom code to their search engine.
gaureshk3014423
Level 9
Level 9
Hi @christammm, I'll check if we can attack click event on google ads and get back to you 😉
gaureshk3014423
Level 9
Level 9
Hi @christammm, I tried attaching click event on paid ads and it worked fine for me.. I'm attaching a screenshot. You can try this as per your requirement