Referral Program Campaign with Google Form

Start Referral Program Campaign with Google Form

google-forms

Referral Program is becoming the essential part of your business for marketing of your products or service. Now You can start your Referral Marketing program with Invitereferrals which integrate it with different platform like MailChimp, Google Form. It can also simply integrate with CMS like WordPress, Opencart, Prestashop, CS-cart etc.

This Tutorial Provides you the integration steps for the referral program for  Google form which can be run under different alias like refer a friend , invite a friend , refer and earn etc.

Referral Program Campaign with Google Form

Step 0

  • Remove Check From Show link to submit another response and create your form.
Referral-uncheck-refer-a-friend
Uncheck This

Step 1

  • Create a Google Form.
  • Right Click on form and then click on “View Page Source”
employee-referral-program
Sample Form

Step 2

  • Now source code of your Google form page will be open in new window.
  • Copy all the source code (Ctrl+A)
  • Create a new .Html file and open it in a text editor. Here Invitereferrlas-form.html
with-notepad-referrals
Open with Text-Editor

Step 3

  • Now Replace at Line no. 12

<link href=’/static/forms/client/css/1292319201-formview_st_ltr.css’ type=’text/css’ rel=’stylesheet’>

  • With

<link href =’https://docs.google.com/static/forms/client/css/1292319201-formview_st_ltr.css‘ type=’text/css’ rel=’stylesheet’>

replace-url-referral-link
Replace This

Step 4

  • Now Search in text editor for “<form”

You will get the code like this at line no. 294

<form action=”https://docs.google.com/a/tagnpin.com/forms/d/1kwIjhH7ImZIKcGrUNnwmKkSUfISw2KChuLK2kKb81wo/formResponse” method=”POST” id=”ss-form” target=”_self” onsubmit=””>

  • Replace Action tag with with you custom page url for example.

<form action=”My-submit-page.php” method=”POST” id=”ss-form” target=”_self” onsubmit=””>

Custom-Referral-page-for-submit
Custom Submit Page

Step 5

  • Find the all Google Form  Input Field Id from your Form File (Invitereferrlas-form.html)
  • Input field ids entry_1196030779 | entry_1972736941 | entry_1487729974 For Brandid, Name , And Email Respectively
  • Now you get all the variable ids.
input-field-id-referral-form
Input Field id

Step 6

  • Now Create the file you mentioned in action tag here its My-submit-page.php
  • Here in this file you need to get all the variable used in Google form using php script.

as:

My-submit-page.php

<?php

if(isset($_POST[‘submit’]))
{
$brandid = $_POST[‘entry_1196030779’];
//echo”$brandid”;

$name = $_POST[‘entry_1972736941’];

$email = $_POST[‘entry_1487729974’];

}

?>

  • Where  entry_1196030779 | entry_1972736941 | entry_1487729974  is Variable  IDs.

Step 7

  • You have got all the variable. Now you need to submit the form to Google
  • To submit the form Paste the code in My-submit-page.php

My-submit-page.php

<?php

if(isset($_POST[‘submit’]))
{
$brandid = $_POST[‘entry_1196030779’];
//echo”$brandid”;

$name = $_POST[‘entry_1972736941’];

$email = $_POST[‘entry_1487729974’];

}

?>

<body>

<form action=”https://docs.google.com/a/tagnpin.com/forms/d/1kwIjhH7ImZIKcGrUNnwmKkSUfISw2KChuLK2kKb81wo/formResponse” method=”POST” id=”ss-form” target=”_self” onsubmit=””>

Step 8

  • Now copy the all form Input Fields from invitereferrals-form.html to My-submit-page.php
  • Name Change Input Type “Text” to “Hidden”
  • Set Value Tag as <?php echo “$brandid”;  ?>
  • Make all changes for all Input field as:

<input type=”hidden” name=”entry.1196030779″ value=” <?php echo”$brandid”; ?> ” class=”ss-q-short” id=”entry_1196030779” dir=”auto” aria-label=”Brandid ” title=””>

<input type=“hidden” name=”entry.1972736941″ value=”<?php echo”$name”; ?>” class=”ss-q-short” id=”entry_1972736941” dir=”auto” aria-label=”Full Name ” aria-required=”true” required=”” title=””>

<input type=“hidden” name=”entry.1487729974″ value=”<?php echo”$email”; ?>” class=”ss-q-short” id=”entry_1487729974” dir=”auto” aria-label=”Email Address ” aria-required=”true” required=”” title=””>

Step 9

  • Now You just Need to add code to submit the form.
  • Open your Form html file (invitereferrals-form.html) and find <input type=”submit” name=”submit”.
  • Copy the three lines above submit button code i.e

<input type=”hidden” name=”draftResponse” value=”[,,&quot;1064994755172670469&quot;] “>
<input type=”hidden” name=”pageHistory” value=”0″>
<input type=”hidden” name=”fbzx” value=”1064994755172670469″>

Code-referral-code
Copy this

Step 10

  • Now Just copy and paste the Auto Submit Javascript code.
  • You can also add your other third party tracking code as you have all the parameters of Google Form.
  • Your Form will be submit automatically and Will display in you Google Form Response

Now Your final My-submit-page.php 

<?php

if(isset($_POST[‘submit’]))
{
$brandid = $_POST[‘entry_1196030779’];
$name = $_POST[‘entry_1972736941’];
$email = $_POST[‘entry_1487729974’];
}

?>

<body>

https://docs.google.com/a/tagnpin.com/forms/d/1kwIjhH7ImZIKcGrUNnwmKkSUfISw2KChuLK2kKb81wo/formResponse” method=”POST” id=”ss-form” target=”_self” onsubmit=””>

<input type=”hidden” name=”entry.1196030779″ value=” <?php echo”$brandid”; ?> ” class=”ss-q-short” id=”entry_1196030779″ dir=”auto” aria-label=”Brandid ” title=””>

<input type=”hidden” name=”entry.1972736941″ value=” <?php echo”$name”; ?>” class=”ss-q-short” id=”entry_1972736941″ dir=”auto” aria-label=”Full Name ” aria-required=”true” required=”” title=””>

<input type=”hidden” name=”entry.1487729974″ value=” <?php echo”$email”; ?>” class=”ss-q-short” id=”entry_1487729974″ dir=”auto” aria-label=”Email Address ” aria-required=”true” required=”” title=””>

<input type=”hidden” name=”draftResponse” value=”[,,&quot;717384005623682584&quot;]”>

<input type=”hidden” name=”pageHistory” value=”0″>
<input type=”hidden” name=”fbzx” value=”717384005623682584″>

<div class=”ss-item ss-navigate”><table id=”navigation-table”><tbody><tr><td class=”ss-form-entry goog-inline-block” id=”navigation-buttons” dir=”ltr”>

<!– AUTO SUBMIT JAVASCRIPT CODE –>
<script type=”text/javascript”>
document.getElementById(“ss-form”).submit(); // Here formid is the id of your form
</script>

</form>
</body>

Step 11

  • Upload both files invitereferrals-form.html & My-submit-page.php to your server.
  • The uploaded location of file  invitereferrals-form.html will be your new Google Form Address to Share.
  • For example www.yoursite.com/form/invitereferrals-form.html.

This tutorial is Over 

Shivani

Shivani is a content writer at InviteReferrals. She writes SEO articles, blogs, and guest posts for businesses to improve website ranking on SERP. She follows a balanced approach for the quality of content and its marketing. She loves to do creativity, although she had an English major in her graduation.