{"id":2575,"date":"2020-08-19T08:07:58","date_gmt":"2020-08-19T08:07:58","guid":{"rendered":"https:\/\/gaconnector.com\/docs\/?p=2575"},"modified":"2025-09-29T09:45:18","modified_gmt":"2025-09-29T09:45:18","slug":"integrate-ga-connector-calendly-forms","status":"publish","type":"post","link":"https:\/\/gaconnector.com\/docs\/integrate-ga-connector-calendly-forms\/","title":{"rendered":"How to integrate GA Connector with Calendly Forms"},"content":{"rendered":"<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">The instructions below apply to\u00a0<strong>Cookie-Based integration<\/strong>.<\/p>\n<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">If you are using\u00a0<strong>API-Based integration<\/strong>, please note that Calendly Forms does not support it. You will need to follow the <strong>Cookie-Based integration<\/strong>\u00a0steps instead.<\/p>\n<p data-pm-slice=\"1 1 [&quot;blockquote&quot;,{}]\">Not sure which instructions to follow? Start here:\u00a0<strong><a class=\"ProsemirrorEditor-link\" href=\"https:\/\/gaconnector.com\/docs\/how-to-check-which-ga-connector-integration-type-youre-using\/\">How to Check Which GA Connector Integration Type You\u2019re Using<\/a>.<\/strong><\/p>\n<p>Unfortunately, Calendly only allows the following parameters to be passed into their forms<\/p>\n<ul>\n<li>Campaign<\/li>\n<li>Source<\/li>\n<li>Medium<\/li>\n<li>Content<\/li>\n<li>Term<\/li>\n<\/ul>\n<p>GA Connector will be able to pass the \u201cLast Click\u201d values of the mentioned fields to your Calendly Leads.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Installed either GA Connector <a href=\"http:\/\/zuev.software\/download\/ga-connector-plugin.zip\">WordPress plugin<\/a> or GA Connector script on your website:<\/li>\n<li>GA Connector script must be loaded before your Calendly form. Putting the GA Connector script on the &lt;head&gt; of your website would work.<\/li>\n<\/ul>\n<pre class=\"lang:default decode:true\" data-url=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2017\/11\/gaconnector-tracking-code.js?v=2\"><\/pre>\n<h2>Set up\u00a0Calendly Form using \u00a0Developer embed code<\/h2>\n<p>In order to pass GA Connector information to Calendly, you must embed your Calendly form in your website using the developer embed option.\u00a0<\/p>\n<p>Instead of using the default embed code, use the code below to embed your form in your website (change the value of the URL property on line 9 with the URL of your form, e.g. url: &#8216;https:\/\/calendly.com\/company-name\/form-name&#8221;\u00a0)\u00a0<\/p>\n<pre class=\"lang:default decode:true\">&lt;!-- Calendly inline widget begin --&gt;\r\n  &lt;div class=\"calendly-inline-widget\" style=\"min-width: 340px; height: 900px;\" data-auto-load=\"false\"&gt;\r\n    &lt;script type=\"text\/javascript\" src=\"https:\/\/assets.calendly.com\/assets\/external\/widget.js\"&gt;&lt;\/script&gt;\r\n    &lt;script&gt;\r\n    (function() {\r\n      var gaFields;\r\n      function initWidget() {\r\n        Calendly.initInlineWidget({\r\n          url: 'url-of-your-calendly-form',\r\n          parentElement: document.querySelector('.calendly-inline-widget'),\r\n          utm: {\r\n            utmCampaign: gaFields.lc_campaign,\r\n            utmSource: gaFields.lc_source,\r\n            utmMedium: gaFields.lc_medium,\r\n            utmContent: gaFields.lc_content,\r\n            utmTerm: gaFields.lc_term\r\n          }\r\n        });\r\n      }\r\n      function checkGaconnector() {\r\n        gaFields = gaconnector.getCookieValues();\r\n        return !!gaFields.lc_source;\r\n      }\r\n      var interval = setInterval(function() {\r\n        if(checkGaconnector()) {\r\n          initWidget();\r\n          clearInterval(interval);\r\n        }\r\n      }, 1000);\r\n    })();\r\n    &lt;\/script&gt;\r\n  &lt;\/div&gt;\r\n  &lt;!-- Calendly inline widget end --&gt;\r\n<\/pre>\n<p>For more information regarding using Advanced embed codes in Calendly, please see <a title=\"\" href=\"https:\/\/help.calendly.com\/hc\/en-us\/articles\/360020052833-Advanced-embed-options\" target=\"_blank\" rel=\"noopener noreferrer\">this article<\/a>.<\/p>\n<p>After adding setting up the code above, your Calendly leads should now contain tracking information from GA Connector.<\/p>\n<h2>Passing GA Connector information to your Calendly\u00a0form via hyperlink<\/h2>\n<p>If you are using Calendly links\u00a0instead of embedding them in your website, you can still pass GA Connector to them.\u00a0 Just add the following code at the bottom of your website near the closing &lt;\/body&gt; tag<\/p>\n<pre class=\"lang:default decode:true\">&lt;script&gt;\r\nvar els = document.querySelectorAll(\"a[href^='https:\/\/calendly.com']\");\r\nvar gaFields;\r\n\r\nfunction checkGaconnector() {\r\n gaFields = gaconnector.getCookieValues();\r\n return !!gaFields.lc_source\r\n}\r\n\r\nfunction toQueryString(obj) {\r\n var str = [];\r\n for (var p in obj) {\r\n if (obj.hasOwnProperty(p)) {\r\n str.push(encodeURIComponent(p) + \"=\" + encodeURIComponent(obj[p]));\r\n }\r\n }\r\n return str.join(\"&amp;\");\r\n}\r\n\r\nvar interval = setInterval(function() {\r\n\r\n if (checkGaconnector()) {\r\n\r\n var searchParametersData = {\r\n 'utm_campaign': gaFields.lc_campaign,\r\n 'utm_source': gaFields.lc_source,\r\n 'utm_medium': gaFields.lc_medium,\r\n 'utm_content': gaFields.lc_content,\r\n 'utm_term': gaFields.lc_term\r\n }\r\n\r\n for (var i = 0, l = els.length; i &lt; l; i++) {\r\n var el = els[i];\r\n el.href = el.href + '?' + toQueryString(searchParametersData);\r\n }\r\n\r\n clearInterval(interval);\r\n\r\n }\r\n\r\n}, 1000);\r\n&lt;\/script&gt;<\/pre>\n<p>This code searches for\u00a0Calendly &lt;a&gt;\u00a0tags on your website and appends them with GA Connector information.<\/p>\n<h2>Checking your integration<\/h2>\n<p>To verify that your GA Connector to Calendly Form integration is working,<\/p>\n<ol>\n<li>Complete a test submission on your Calendly form<\/li>\n<li>Check if GA Connection information is passed by looking\u00a0in your Calendly Dashboard (My Calendly &gt; Scheduled Events &gt; Created Event)<\/li>\n<li>On the Created event, it should contain UTM information similar to the screenshot below.<\/li>\n<\/ol>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-2578\" src=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test.jpg\" alt=\"\" width=\"963\" height=\"468\" srcset=\"https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test.jpg 963w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test-300x146.jpg 300w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test-768x373.jpg 768w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test-700x340.jpg 700w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test-60x29.jpg 60w, https:\/\/gaconnector.com\/docs\/wp-content\/uploads\/2020\/07\/calendly-test-150x73.jpg 150w\" sizes=\"(max-width: 963px) 100vw, 963px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The instructions below apply to\u00a0Cookie-Based integration. If you are using\u00a0API-Based integration, please note that Calendly Forms does not support it. You will need to follow the Cookie-Based integration\u00a0steps instead. Not sure which instructions to follow? Start here:\u00a0How to Check Which GA Connector Integration Type You\u2019re Using. Unfortunately, Calendly only allows the following parameters to be [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"_links":{"self":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2575"}],"collection":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/comments?post=2575"}],"version-history":[{"count":8,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2575\/revisions"}],"predecessor-version":[{"id":3750,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/posts\/2575\/revisions\/3750"}],"wp:attachment":[{"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/media?parent=2575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/categories?post=2575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gaconnector.com\/docs\/wp-json\/wp\/v2\/tags?post=2575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}