We help IT Professionals succeed at work.

How to retain Analytics tracking using a third party form processor?

High Priority
92 Views
Last Modified: 2019-03-23
We have a form on a site that displays a thank you page to the user when the form sends successfully. The thank you page contains Google Analytics and Google Ads tracking code, which logs a conversion when the code in fired by the thank you page. Now the client requires the form post to their third party CRM. How would  can we use our thank you page to continue to post to Google Analytics when the form is posting to a url we don't control for processing?
Comment
Watch Question

Scott FellDeveloper & EE Moderator
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
One option is to post to a page that in turn posts silently to the client's CRM.  It would be better if the CRM has an API you can hit to do this gracefully.

If you are redirecting to the client's page and there is no alternative, then the best route would be posting the form to your own page, detect the post, gather the posted data and then redirect to the client's site.

Author

Commented:
Thanks for your help. I will look into this. However, the CRM has specific field names required to capture the data into the system.
Scott FellDeveloper & EE Moderator
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
Right, that is expected.  You just need to post those field names.   How you do that will depend on the language you are using.

Another option is to use ajax. That will allow you to post to the crm and stay on your page or redirect to another page.  What I like about my original option is you can better control spam being sent to the CRM as that will always be hidden from the users.

Author

Commented:
Scott, it looks like I failed to state that the form the client has requested is embedded in an iframe. Does that change any of your suggestions?
Scott FellDeveloper & EE Moderator
CERTIFIED EXPERT
Fellow
Most Valuable Expert 2013

Commented:
In other words the end result will look like below and let's say the page is form.html

FORM.HTML
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>Our Page</title>
</head>
<body>
<iframe src="https://third.party-crm/path_to_client" width="400" height="500"></iframe>
</body>
</html>

Open in new window

where the form lives at https://third.party-crm/path_to_client and that is not controlled by you.

In this case, you can only get analytics for your own site which will be form.html.  You have some options though.  You can check with the third party crm if they allow the client to add their own tracking code.   Then you can add your own code such as google analytics https://developers.google.com/analytics/devguides/collection/analyticsjs/cross-domain.  

I would also check to see if the third party crm offers an api.  If they do, you can track information about the form being submitted on your own server which could hit your database or page with analytics.  Or you can poll the crm every day and get a count or list of new contacts form the previous 24 hours and include a filter if needed.

https://www.zoho.com/crm/help/api/v2/#api-reference
https://developer.salesforce.com/docs/api-explorer

The key is you can't get data from the framed page or site if you don't control it.

Author

Commented:
I'm sorry to be so long getting back to you on this. There are two options with the form: create our own custom form using the CRM API or use the embedded form that lives at the CRM. The client has chosen the latter due to our inability to post certain fields from a custom form to the CRM the way they need it for management purposes. We tried. The CRM API is very limited and does not provide a way to capture the data from a custom form to satisfy management. The CRM cannot add tracking code to the embedded form because that form is also used by 100s of other companies around the country.

We can track visits to the form page, but we cannot track by device, conversion, conversion rate, etc. Your last comment above probably sums it up pretty accurately.

Author

Commented:
I'm sorry for the long delay. We have determined that there is not an accurate solution, since we cannot add or change code in the CRM. Their API is very limited. Thanks much for your suggestions

Explore More ContentExplore courses, solutions, and other research materials related to this topic.