Help with GetResponse

2 replies
Hi there!

I'm trying to create a GetResponse Custom HTML form in a way that a I can track utm tags and the Subscription URL, and I'm having a hard time in doing that.

I managed to store the utm tags in cookies (utm_source, utm_medium and utm_campaign in this example). What I need now is to read the cookies and store these cooks in the appropriate hidden fields, and store the URL location in another hidden field.

I've been messing around with a lot of Javascript code but I haven't been able to accomplish it.

Can someone help me with this? I've attached the code below, without any javascript, just HTML.

Any help will be much appreciated.


Here is the code:

Code:
HTML Code:
<form  action="https://app.getresponse.com/add_subscriber.html" accept-charset="utf-8" method="post">
    <!-- Email field (required) -->
    <input type="text" name="email" id="email" placeholder="Deixe seu e-mail aqui..." style="font-size: 20px !important; color: #484848;font-family: Lato;" />
    <!-- Campaign token -->
    <!-- Get the token at: [url]https://app.getresponse.com/campaign_list.html[/url] -->
    <input type="hidden" name="campaign_token" value="noK7c" />
    <!-- Thank you page (optional) -->
    <input type="hidden" name="thankyou_url" value="http://felipecoelho.net/obrigado01" /> -->

    <input type="hidden" name="custom_utm_source" id="custom_utm_source" value="" /> 
    <input type="hidden" name="custom_utm_medium" id="custom_utm_medium" value="" /> 
    <input type="hidden" name="custom_utm_campaign" id="custom_utm_campaign" value="" /> 
    <input type="hidden" name="custom_insc_url" id="custom_insc_url" value="" />
	
	    <!-- Subscriber button -->
    <input type="submit"   class="om-trigger-conversion" value="QUERO ME CADASTRAR!" style="text-align: center; font-size: 18px; font-weight: 700; font-family: Lato; color: #ffffff; background-color: #ff9900; max-width: 250px !important;" /> 
</form>
#custom fields #getresponse #hidden fields #tracking
  • Profile picture of the author sylviad
    Sorry... all I can offer is that you contact GetResponse Support, if you haven't already. They might be able to help you. In my experience, they've been good with their help.

    Sylvia
    Signature
    :: Got a dog? Visit my blog. Dog Talk Weekly
    :: Writing, Audio Transcription Services? - Award-winning Journalist is taking new projects. Warrior Discounts!
    {{ DiscussionBoard.errors[10925824].message }}
  • Profile picture of the author Felipe Coelho
    Finallly found the solution (check the comments):

    HTML Code:
    <!--- Go to [url]https://github.com/js-cookie/js-cookie[/url], click on the word "HERE" at "Download the script HERE" -->
    <!-- This will download the js.cookie.js file -->
    <!-- Create a folder called "js" in your root folder, upload js.cookie.js to that folder -->
    <!-- Insert this line at the head section: <script src="/js/js.cookie.js" type="text/javascript"></script> -->
    <!-- Paste the following code in the body section
    
    <script type="text/javascript" charset="utf-8">
    // Parse the URL
    function getParameterByName(name) {
    	name = name.replace(/[[]/, "[").replace(/[]]/, "]");
    	var regex = new RegExp("[?&]" + name + "=([^&#]*)"),
    		results = regex.exec(location.search);
    	return results === null ? "" : decodeURIComponent(results[1].replace(/+/g, " "));
    }
    // Give the URL parameters variable names
    var source = getParameterByName('utm_source');
    var medium = getParameterByName('utm_medium');
    var campaign = getParameterByName('utm_campaign');
    var content = getParameterByName('utm_content');
    var term = getParameterByName('utm_term');
    
    // Set the cookies
    if(Cookies.get('utm_source') == null || Cookies.get('utm_source') == "") {
    Cookies.set('utm_source', source);
    }
    if(Cookies.get('utm_medium') == null || Cookies.get('utm_medium') == "") {
    Cookies.set('utm_medium', medium);
    }
    if(Cookies.get('utm_campaign') == null || Cookies.get('utm_campaign') == "") {
    Cookies.set('utm_campaign', campaign);
    }
    if(Cookies.get('utm_content') == null || Cookies.get('utm_content') == "") {
    Cookies.set('utm_content', content);
    }
    if(Cookies.get('utm_term') == null || Cookies.get('utm_term') == "") {
    Cookies.set('utm_term', term);
    }
    </script>
    
    <!-- Customize the following script with the correct form name -->
    <script type="text/javascript" charset="utf-8">
    $(document).ready(function() { 
    			document.form1.custom_utm_source.value = Cookies.get('utm_source');
    			document.form1.custom_utm_medium.value = Cookies.get('utm_medium');
    			document.form1.custom_utm_campaign.value = Cookies.get('utm_campaign');
    			document.form1.custom_utm_content.value = Cookies.get('utm_content');
    			document.form1.custom_utm_term.value = Cookies.get('utm_term');
    			document.form1.custom_subscription_url.value = window.location.href;
    });
    </script>
    
    <!-- Pick up a form name that's not already in use -->
    <form  name="form1" action="https://app.getresponse.com/add_subscriber.html" accept-charset="utf-8" method="post">
    	
        <!-- Customize here the style of the e-mail field -->
    		<input type="text" name="email" id="email" placeholder="Deixe seu e-mail aqui..." style="font-size: 20px !important; color: #484848;font-family: Lato;" />
        <!-- Cutomize the campaign token -->
    		<input type="hidden" name="campaign_token" value="noK7c" />
    	  <!-- Customize the thank you page -->
    		<input type="hidden" name="thankyou_url" value="http://felipecoelho.net/obrigado01" /> 
    	
    	
        <input type="hidden" name="custom_utm_source" id="custom_utm_source" value="" /> 
        <input type="hidden" name="custom_utm_medium" id="custom_utm_medium" value="" /> 
        <input type="hidden" name="custom_utm_campaign" id="custom_utm_campaign" value="" /> 
      	<input type="hidden" name="custom_utm_content" id="custom_utm_content" value="" /> 
      	<input type="hidden" name="custom_utm_term" id="custom_utm_term" value="" /> 
        <input type="hidden" name="custom_subscription_url" id="custom_subscription_url" value="" />
    	
    	  <!-- Customize the button style -->
        <input type="submit" class="om-trigger-conversion" value="QUERO ME CADASTRAR!" style="text-align: center; font-size: 18px; font-weight: 700; font-family: Lato; color: #ffffff; background-color: #ff9900; max-width: 250px !important;" /> 
    </form>
    {{ DiscussionBoard.errors[10926193].message }}

Trending Topics