• ks
  • 5 Points
  • Member since 2007

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 17

So, I installed google apps and can send email from salesforce through my domain. 


Now, I am trying to receive emails from my domain to my sales force account.  I tried simply forwarding all messages from gmail to my salesforce email, but it said that the email it was sent from wasn't authorized to send emails to salesforce.


This can be done, right?  What am I missing?



  • March 30, 2009
  • Like
  • 0
I have to implement custom WebToLead landing page.

Standard SalesForce page submits lead form data over WevToLead servlet where the information is being stored in the database.
At the same time SalesForce populates Lead Source Details record with Campaign name, Ad Group, Keyword, Keyword phrase etc in case of Google ad lead source, or Referring Url, search engine and keyword phrase in case of organic lead source.

There is no problem to insert/update new lead information using API.

The problem is to to retrieve Lead Source Details information.

Is there any way to get Lead Source Details information using API?


  • July 03, 2008
  • Like
  • 0
Does anyone know of a way to reconect an opportunity so that SF recognizes it as an AdWords originated deal? I've tried changing lead source to 'Google Adwords" but there must be something more... the Google AdWords Dashboard reports still don't recognize it as sourcing from AdWords. I think the opportunity record was not created from the adwords originating lead, rather some other round about way, and I want to see it corrected in reports.
  • December 12, 2007
  • Like
  • 0

Dear Sirs,

I am trying to get my API code for Google AdWords but there seems to be a conflict since I set it up the Google AdWords tracking - as explained below: AdWords API tokens are assigned to what is known as MCC accounts, which are parent accounts that contain normal AdWords accounts as children. Your account is a child, and the tokens are assigned to your parent MCC. The following emails are assigned as having access to your parent MCC: adwords.mcc@kieden.com and jshafton+sfdc@google.com. If for some reason you need to access your AdWords API tokens, you will need to coordinate it with the owners of one of those two addresses.

Has anyone had a similar issue— If so, how did you resolve it please?

Thanks Mohammed

Hi I'm having problems implementing SFGA on a web to lead form. Due to the requirements of the site I am developing, I can't use the standard ACTION for the form; the data must be captured in a database, sent via email and then a function is used to send it to Salesforce.com. The function's code (programmed in PHP) is as follows:

function sendToHost($host,$method,$path,$data,$useragent=0) {
    if (empty($method)) {
        $method = 'GET';
    $method = strtoupper($method);
    $fp = fsockopen($host, 80);
    if ($method == 'GET') {
        $path .= '?' . $data;
    fputs($fp, "$method $path HTTP/1.1\r\n");
    fputs($fp, "Host: $host\r\n");
    if ($method == 'POST') {
        fputs($fp,"Content-type: application/x-www-form-urlencoded\r\n");
        fputs($fp, "Content-length: " . strlen($data) . "\r\n");
    if ($useragent) {
        fputs($fp, "User-Agent: MSIE\r\n");
    fputs($fp, "Connection: close\r\n\r\n");
    if ($method == 'POST') {
        fputs($fp, $data);
    $buf = "";
    while (!feof($fp)) {
        $buf .= fgets($fp,128);
        $buf .= ".";
    return $buf;

And is invoked with:

 $sfdata = "oid=XXXXXXXXXXXXXXX" .
     "&salutation="      . urlencode($HTTP_POST_VARS['x_salut'])            .
     "&first_name="      . urlencode($HTTP_POST_VARS['x_fname'])            .
     ... all the form fields go here ... );
     $out = sendToHost("www.salesforce.com", "POST",        "/servlet/servlet.WebToLead?encoding=UTF-8", $sfdata);

The problem that I'm having is that I don't know how to do to add the google adwords processing to this form.  The leads are being generated correctly.

Can anyone help me?

Thanks in advance

Message Edited by pcotro on 11-08-2007 12:43 PM

  • November 08, 2007
  • Like
  • 0

Here's an S-control I made and presented on at Dreamforce that will populate custom lead fields with the Google Campaign, AdGroup, and AdWord.  The prerequisite for this to work is to have Salesforce for Google Adwords setup and to have the custom lead fields (Google_Campaign__c, AdKeyword__c, Google_AdGroup__c) created.  It also uses a custom lead field called "Last4__c" which is actually a formula field that returns "Yes" if the lead has been created in the last 4 days. I use this to keep the number of leads being updated to a manageable number. I’m posting both to share but also because I bet some of the real talents on this board can improve upon this code.  I’m not a programmer and I owe those on this board a lot of thanks for helping me to learn how to write S-Controls. 

The benefit to this code is that with the SFGA info in custom fields as opposed to tasks you can do all sorts of custom reporting.  I launch this S-Control from a custom homepage component daily in order to populate the custom lead fields before I start the lead conversion process.

Thanks to all on this board who give their time and advice, it is most appreciated.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<script src="http://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js" type="text/javascript"></script>
<script language="JavaScript">

function initPage()
sforceClient.init("{!API.Session_ID}", "{!API.Partner_Server_URL_70}", true);

function updateObjects()
var queryResult3 = sforceClient.query("Select ID, Google_Campaign__c, AdKeyword__c, Google_AdGroup__c From Lead where Last4__c = 'Yes' and LeadSource = 'Google AdWords'")

var updateObjects = new Array();

for (var i=0;i<queryResult3.size;i++)
var lhaccount2 = queryResult3.records[i];
var ids=lhaccount2.get("Id");

var queryResultP = sforceClient.query("Select ID, Name From SFGA__Google_Campaign__c where SFGA__Lead__c = '"+ids+"'")
var queryResultK = sforceClient.query("Select ID, Name From SFGA__Keyword__c where SFGA__Lead__c = '"+ids+"'")
var queryResultA = sforceClient.query("Select ID, Name From SFGA__Ad_Group__c where SFGA__Lead__c = '"+ids+"'")

var lhaccount3 = queryResultP.records[0];
var Name=lhaccount3.get("Name");

var lhaccount4 = queryResultK.records[0];
var Keyword=lhaccount4.get("Name");

var lhaccount5 = queryResultA.records[0];
var Group=lhaccount5.get("Name");

lhaccount2.set("Google_Campaign__c", Name);
lhaccount2.set("AdKeyword__c", Keyword);
lhaccount2.set("Google_AdGroup__c", Group);



var saveResults = sforceClient.Update(updateObjects)[0];
<body onload="initPage()">

We are attempting to hide the Google activity history update note from all but administrators in our system.
This is the comment under the lead source/task detail section that indicates "tracking provided by salesforce and google adwords". 
We currently hide the lead source field from sales phone reps. 
The Google populates a comment that they are able to see.
However, we can't eliminate the activity history view as the use this for notes.
We are just seeking advice and direction.  Could this be a workflow element we can change?
We're currently attempting to manually insert a lead into Salesforce rather than relying on the client web browser to be momentarily shunted to http://lct.salesforce.com/sfga.

We're doing this by capturing the overwritten value of sfga in a webform when the javascript is executed as well as capturing current browser cookies into our own database. This data is later "replayed" to the http://lct.salesforce.com/sfga script later on by using libcurl. We then make our usual web-to-lead function call.

While the lead does get inserted into salesforce, it is never associated with the original google keywords/adwords that led to the page in the first place.

So my question is: what data must we send to http://lct.salesforce.com/sfga in order for it to be able to correlate the original google search terms with the lead that's being inserted?

  • September 26, 2007
  • Like
  • 0
Has anyone else noticed extremely high API usage with the Google AdWords app installed?  For some reason we're seeing 1500 API calls per day... which seems ridiculously high.

Maybe I have something set up improperly?

Message Edited by DDean on 09-25-2007 03:17 PM

  • September 25, 2007
  • Like
  • 0
Have been working on trying to get our drupal CMS form engine to submit to the web2lead tracking for Google.

Have everything working but can't get the form to return to the landing page. I seems that the salesforce javascript alters the action value in the form and just drops you on a blank sf page - http://lct.salesforce.com/sfga

And ideas??? Am willing to pay for a little assistance on this one as its preventing up from being able to use salesforce.

  • September 21, 2007
  • Like
  • 0
Hi Guys,
I have got a developer account at Salesforce and don't see the "Google AdWords Setup" tab in there. Also I haven't found the custom objects named "Ad Text", "Keyword", "Google Campaign", "Ad Group" etc. etc. in my account. While all these do exist in a trial account. Now here's what I want to do :
I want to connect to Salesforce via Partner API and fetch records in these custom objects. But I cann't connect using the trial account and my developer account doesn't have these objects and Google AdWords Setup.
How can I get the Google AdWord Setup into my developer account ? Any suggestions.... ?
It was my understanding that if you had the Google Adwords app installed and had the appropriate javascript coding loaded on each of your website pages and had the appropriate sfga coding on the web-to-lead form, when the lead was created it would populate the lead_source field with one of four values, depending on where the web link orginally came from.

Unfortunately that isnt happening for me! I have used the Adwords tool to check that everything is setup ok and salesforce reports back that it is happy with both the page and the form. However, whenever a form is completed, the lead is created with an empty lead_source.

I tried creating a vanilla form with just the basic components and had the same issue.

Anyone else come across this before? Any ideas?
Hi All,
I require some details on how the salesforce apex for google adwords work. Please some one help me getting info about what salesforce apex  for google adwords does and how it work.   
thanking you advance 
  • March 06, 2007
  • Like
  • 0
It seems there been some significant changes to the SFDC (Kieden) Google Adwords tracking functionality. As of midnight (PST) 1/30 the lead source field isn't being populated by the Adwords program but the Lead Details activity is there and even shows some new info at the bottom re "referrer". Any chance that the Lead Source field on WTL forms will start being updated again??