{"id":7084,"date":"2021-04-15T07:14:45","date_gmt":"2021-04-15T07:14:45","guid":{"rendered":"https:\/\/docs.campaignsuite.nl\/docs\/gravity-forms\/cs-e-commerce\/"},"modified":"2021-09-22T12:48:32","modified_gmt":"2021-09-22T12:48:32","slug":"cs-e-commerce","status":"publish","type":"docs","link":"https:\/\/docs.campaignsuite.nl\/en\/docs\/gravity-forms\/cs-e-commerce\/","title":{"rendered":"CS E-commerce"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"7084\" class=\"elementor elementor-7084\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-29f5119 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"29f5119\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-0cb6842\" data-id=\"0cb6842\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-1bbfb71 elementor-widget elementor-widget-text-editor\" data-id=\"1bbfb71\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>If CampaignSuite is activated and the form makes a transaction, a Google E-commerce script will be added by default to the thank you message of the Gravity Forms form.<\/p><p>This code looks like this:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b378260 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b378260\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-8602da0\" data-id=\"8602da0\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-cd2eef1 elementor-widget elementor-widget-docly_code_syntax_highlighter\" data-id=\"cd2eef1\" data-element_type=\"widget\" data-widget_type=\"docly_code_syntax_highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t                    <div class=\"docly-source-code prism\" data-lng-type=\"javascript\">\r\n\t\t\t<pre>\r\n\t\t\t\t<code class=\"language-javascript\">\r\n\t\t\t\t\t\n  if(window.dataLayer !== undefined){\n    window.dataLayer = window.dataLayer || [];\n    dataLayer.push({\n      &#039;event&#039;: &#039;donatie&#039;,\n      &#039;ecommerce&#039;: {\n      &#039;purchase&#039;: {\n        &#039;actionField&#039;: {\n            &#039;id&#039;: 1234, \/\/gravity forms entry ID\n            &#039;revenue&#039;: 12.00, \/\/totaal bedrag\n            &#039;list&#039;: &#039;&#039;,\n            &#039;option&#039;: &#039;&#039;,\n            &#039;tax&#039;:&#039;0&#039;,\n            &#039;shipping&#039;: 0\n        },\n        &#039;products&#039;: [{\n          &#039;name&#039; : &#039;Donatie&#039;,\n          &#039;id&#039;: &#039;1&#039;, \/\/form ID\n          &#039;price&#039;: 12.00,\n          &#039;brand&#039;: &#039;&#039;,\n          &#039;category&#039;: &#039;One-time&#039;, \/\/frequentie\n          &#039;variant&#039;: &#039;Ideal&#039;, \/\/payment method\n          &#039;quantity&#039;: 1\n        }]\n      }\n    }\n    });\n  }\n\t\t\t\t<\/code>\r\n\t\t\t<\/pre>\r\n            <\/div>\r\n                \t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-beaf7a8 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"beaf7a8\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9ed74c4\" data-id=\"9ed74c4\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-975da92 elementor-widget elementor-widget-text-editor\" data-id=\"975da92\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4>E-commerce shortcode<\/h4><p>If your form confirmation does not have <strong> Text <\/strong> but <strong> Page <\/strong>, then it is also possible to use a shortcode on the page where the donor ends up after a successful payment in order to still have the Google E-commerce script executed. Then add the following to this page:<\/p><pre> [ecommerce] <\/pre>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-21383f1 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"21383f1\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-3405738\" data-id=\"3405738\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-9d9b241 elementor-widget elementor-widget-text-editor\" data-id=\"9d9b241\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<h4> Advanced E-commerce Settings <\/h4>\nAn extensive feature of CampaignSuite is to be able to make more settings for the E-commerce code. This feature is not included in the basic package. Please contact us if you are interested in this extension.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e7da391 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e7da391\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7f37387\" data-id=\"7f37387\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2313d36 elementor-widget elementor-widget-image\" data-id=\"2313d36\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"918\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50-1024x918.png\" class=\"attachment-large size-large\" alt=\"\" srcset=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50-1024x918.png 1024w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50-300x269.png 300w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50-768x689.png 768w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50-1536x1378.png 1536w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2021\/03\/Screenshot-2021-05-13-at-20.03.50.png 1844w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-458cbc2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"458cbc2\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-1b393f2\" data-id=\"1b393f2\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-bf23b12 elementor-widget elementor-widget-text-editor\" data-id=\"bf23b12\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tIn E-commerce settings you can set all fields of the E-commerce script. This option is often used with hidden fields in the form. The visitor does not see these fields, but you can have them pre-filled with values. You then link this to the E-commerce field in the settings.\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>If CampaignSuite is activated and the form makes a transaction, a Google E-commerce script will be added by default to the thank you message of the Gravity Forms form. This code looks like this: if(window.dataLayer !== undefined){ window.dataLayer = window.dataLayer || []; dataLayer.push({ &#039;event&#039;: &#039;donatie&#039;, &#039;ecommerce&#039;: { &#039;purchase&#039;: { &#039;actionField&#039;: { &#039;id&#039;: 1234, \/\/gravity forms [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7068,"menu_order":9,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-7084","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7084","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/comments?post=7084"}],"version-history":[{"count":6,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7084\/revisions"}],"predecessor-version":[{"id":7385,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7084\/revisions\/7385"}],"up":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7068"}],"wp:attachment":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/media?parent=7084"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/doc_tag?post=7084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}