• Annonces

    • Olivier Devriese

      Nouveauté du forum, les blogs !   30/04/2016

      Envie de créer votre blog FileMaker ? Ca ne peut pas être plus simple qu'avec cette nouvelle section du site FM Source qui est désormais plus qu'un simple forum mais un vrai centre de ressource. Vous pouvez aussi facilement l'alimenter en le liant avec le flux RSS d'un autre blog que vous possédez déjà.
  • billets
  • commentaires
  • vues
    1 221

Integrate Google AdWords with Your Salesforce Org Through Pardot

Soliant Consulting

60 vues

If you use Pardot to handle your marketing campaigns and have tried to integrate your Google AdWords to your Salesforce org, you have probably noticed that Google does not provide any step-by-step solutions on how to integrate all three of them together to track your clickable ads. It took some time, but after some coding changes and a rather long phone call with Google, there is a solution that can now be followed to solve this.

If you are using a native Salesforce web-to-lead form, then you can find standard support here from Google. If you use Pardot for your landing pages, continue reading below to get some help integrating Google AdWords and Salesforce through Pardot.

Setting Up Your Files

Create new GCLID Fields

To start off, let’s create new GCLID fields on both the opportunity and lead objects. See Figures 1 and 2 below.

Add the GCID field to the Oportunity

Figure 1. Add the GCID field to the Opportunity (click image to enlarge).

Add tje GCID field to the Lead

Figure 2. Add the GCID field to the Lead (click image to enlarge).

After the two fields have been created on the opportunity and lead objects, we must map the fields, as shown in Figures 3 and 4.

Figure 3 for the "Integrate Google AdWords with Your Salesforce Org Through Pardot

Figure 3. Begin to map the lead fields.

Figure 4. Mapping the Lead and GCID fields

Figure 4. Mapping the Lead and GCID fields

Add the script to your landing pages

Now that the configurations have been completed, it’s time to touch some code on your website. If you don’t have access to this, contact your webmaster to help with this step. A cookie value needs to be stored on your website to save the GCLID based on the ad that is clicked on. The following script should be added before your tags on all of your landing pages on the website.

<script type="text/javascript">
    function setCookie(name, value, days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
        document.cookie = name + "=" + value + expires + ";domain=" + location.hostname.replace("www.", \'\');
    function getParam(p) {
        var match = RegExp(\'[?&]\' + p + \'=([^&]*)\').exec(window.location.search);
        return match && decodeURIComponent(match[1].replace(/\+/g, \' \'));
    var gclid = getParam(\'gclid\');
    if (gclid) {
        var gclsrc = getParam(\'gclsrc\');
        if (!gclsrc || gclsrc.indexOf(\'aw\') !== -1) {
            setCookie(\'gclid\', gclid, 90);

Create a hidden field

Once this step is completed, we will now focus on the Pardot portion of the integration. To start off, on your landing pages, create a hidden field labeled GCLID.

Figure 5. Create a hidden GCID field

Figure 5 (click image to enlarge)

Add code snippet to your form

Next, on the same form, click on “Look and Feel” on the menu bar towards the top of the page. You will see a “Below Form” tab which should be clicked on. When clicked, all the way to the right you will see an html button (next to the omega symbol) click that.

Figure 6. Add code snippet to your form.

Figure 6 (click image to enlarge)

  window.onload = function getGclid() {
    document.getElementByID("xxxx").value = (name = new RegExp('(?:^|;\\s*)gclid=([^;]*)').exec(document.cookie)) ? name.split(",")[1] : ""; }   

After this piece of code is inserted into the Pardot form, you are now ready to test the integration between Salesforce and Google AdWords through Pardot. In the URL of your contact us page, add “?gclid=blogTest” (or any testing word) at the end as shown below.


Find the information submitted

Once you submit the lead information, in Salesforce, go to Leads and find the information that you submitted (see Figure 7).

Figure 7. Find the information you submitted

Figure 7 (click image to enlarge)

Keyword added to the GCLID field

In the GCLID field, you should see the keyword that you entered at the end of the URL in the step above, in my case being “blogTest” as shown in Figure 8.

Figure 8. Keyword added to the GCLID field

Figure 8 (click image to enlarge)

When the link is successful — meaning you see the keyword “blogTest” that you entered into the URL in your lead in Salesforce — then you have now integrated Google AdWords with Salesforce through Pardot! The final step, is to link your Salesforce account to your Google AdWords account.

Link Your Salesforce and Google AdWords Accounts

Sign in to your Google AdWords account and on the right hand side next to your customer id, you will see a cog. When you click on the cog, there should be a link called “Linked accounts.”

Figure 9. Click on the cog to access "Linked accounts"

Figure 9

Choose accounts to link to Google AdWords

After you have clicked the Linked accounts link, you should be on the following page. Here you can choose which accounts to link to your Google AdWords account. In our case, click on “View details” under Salesforce.com.

Figure 10. Choose an account to link to Google AdWords

Figure 10

Log into your Salesforce organization

Finally, click on the “+ Account” button on the page and you will be redirected to the Salesforce authentication page to login to your Salesforce organization.

Figure 11. Use the add account button.

Figure 11 (click image to enlarge)

Once your Salesforce organization is linked, you will be prompted to set up conversions that are relevant to your Google ads. After you set up these conversions, you are now ready to completely track your clickable ads with AdWords and Salesforce through Pardot.

The post Integrate Google AdWords with Your Salesforce Org Through Pardot appeared first on Soliant Consulting.

Afficher la totalité du billet

  Signaler le billet

0 Commentaire

Aucun commentaire à afficher.

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant