Audience based on user input





We want to show a banner based on user input on payment page. when user starts to type bank number , we need to understand which bank that belongs to and show a banner in payment page.


is it possible create such a dynamic audience based on user input ?

Accepted Solutions (0)

Answers (2)

Answers (2)



Hey @burcakk14301493 


Just been playing around with this and found a solution that will work:


1) You need to fire a custom get / apply offer function on the page you are intending to show the banner (either in the code or with Adobe DTM/Launch), this code should be triggered on the user leaving the input field or on key up (you can decide). Using jQuery it would look something like this:


$("#validationDefault01").focusout(function(){      // This is triggering on user leaving an input field{   

  "mbox": "target-global-mbox",

  "params": {

       "bankID": $("#validationDefault01").val(),    // This is the value of that input field being passed to Target


  "success": function(offer) {            { 

           "mbox": "target-global-mbox",

           "offer": offer 

        } );


  "error": function(status, error) {           

      console.log('Error', status, error);





2) Once you have the param sending to Target create a profile script like this:


Screenshot 2020-04-15 at 13.01.27.png

This profile script will mach user input "12345" to the bank Halifax, you will need to add all your band codes to this.


3) Once you have this you can set up and audience and create a test with it.


Screenshot 2020-04-15 at 13.20.52.png

Screenshot 2020-04-15 at 13.22.06.png


I have set up an example test here:


If you paste the above function into the Javascript console and type 12345 into the name field of my contact form, when you tab / click away you will see the test fire.


Screenshot 2020-04-15 at 13.06.19.png


Screenshot 2020-04-15 at 13.08.59.png

Hope this helps.







Rather than trying to create a dynamic audience based on user input, is it possible that you deploy the offer that changes the banner dependent on bank number rather than setting an audience first? If you need to any reporting, perhaps you can fire off analytics requests?


Would that approach work instead? Otherwise you could try user profile scripts.