Go to your Google Ads Manager, and go to Ads section.
Click on the Tools icon and click on Scripts ( under Bulk Actions ) and click on the plus icon to create a new script.
Copy the code below and paste in the new script
function main() { var adIterator = AdsApp.ads().get(); while (adIterator.hasNext()) { var ad = adIterator.next(); var adgroup = ad.getAdGroup().getName().replace(/[^a-zA-Z0-9- ]/g, ""); var campaign = ad.getCampaign().getName().replace(/[^a-zA-Z0-9- ]/g, ""); //var adHeadline = ad.getLongHeadline().replace(/[^a-zA-Z0-9- ]/g, ""); var adID = ad.getId(); var name = campaign + " " + adgroup+ " " + adID; name = name.replace(/\s/g,'-'); //Logger.log( name ); ad.getCampaign().urls().setCustomParameters({adname:name}); } }
Don’t forget to name the script, for example “Atlass ad name generator” and click on save. Before navigating, make sure to click run.
Next, go to All campaigns, click on Settings button, then Account settings and open the tracking section.
Copy this code {lpurl}?gadid={creative}&gadname={_adname}
and paste it in the Tracking Template field
Don’t forget to save the new change
Now, make sure to set up the Google Ads integration if you haven’t done that already.