March 21, 2024

Lead Generation - Script to send different lead values to Google Ads, Meta Ads, etc

If you're a lead generation model, use this script and this tactic to get better leads. Start sending conversion values to Google and Meta according to the quality of your leads.

I recorded a video to show you the different steps.

And you can find below the script (or should I say the scriptS) and the different steps written.

Enjoy!

1. Ask your tech team to push field values from the form registration into the dataLayer when users register

2. Create dataLayer variables in Google Tag Manager (GTM)

2bis. An alternative to dataLayer variables (which is the recommended way) is to create a custom javascript to extract field values directly from GTM:

function () {
   var <variable_name> = document.getElementById('<element_id>').value;
   if (<variable_name>)
       return <variable_name>;
   else
       return "<variable_name> not selected";  
}

3. Create a new custom javascript variable.

- Assign a base value.

- Create a variable for each of the fields that have an impact on your lead value.

- Create a modifier for each of these fields according to the impact on your lead value.

function modifyConvValueRegistration() {
   var value = 100;
   var element1 = {{dataLayer - element1}};
   var element2 = {{dataLayer - element2}};
   var element2 = {{dataLayer - element3}};


   // Apply modifiers based on answers
   if (element1 === 'webanalytics' || service === 'data-visualisation') {
       value *= 0.8;
   }    
   
   if (element2 >= 4) {
       value *= 1.5;
   }

   if (element3 === 'no') {
       value *= 0.2;
   }

   return value;
}

In this case,

  • leads that selected "webanalytics" OR "data-visualisation" on the first element are still valuable but a bit less than the normal leads. Hence a 80% value modifier.
  • Leads that gave 4 or more on the second element are very valuable: 150% value modifier.
  • leads that selected "no" to the element3 have a very low value for us. We therefore apply a 20% value modifier.
  • Starting with a base value of 100, we would have a final value of: 100*0.8*1.5*0.2 = 24

4. Create your Google Ads conversion event (if you need it for Google). Add this custom javascript to the conversion value field

5. In Google Ads, use this conversion for your campaign and use a tROAS bid strategy.

You will get best features of Finance web app

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare,

Get Started