{"id":7846,"date":"2022-10-19T10:54:46","date_gmt":"2022-10-19T10:54:46","guid":{"rendered":"https:\/\/docs.campaignsuite.nl\/docs\/gravity-forms\/measurement\/mapping\/"},"modified":"2022-10-19T11:52:31","modified_gmt":"2022-10-19T11:52:31","slug":"mapping","status":"publish","type":"docs","link":"https:\/\/docs.campaignsuite.nl\/en\/docs\/gravity-forms\/measurement\/mapping\/","title":{"rendered":"Mapping"},"content":{"rendered":"\n<p>As soon as an event type has been chosen and one or more providers have been selected, a block will appear for each provider with options to map fields. In fact, here you are going to set which parameters should have which values \u200b\u200bin the Client Side or Server Side call.<\/p>\n\n\n\n<p>Each block contains an option to place the call Client Side or Server Side. If one of these options is not visible, it is not supported by the provider in combination with the selected event.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_type_of_call.png\" alt=\" \" class=\"wp-image-7854\" width=\"233\" height=\"70\"\/><\/figure>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Client Sid<\/strong>e<br><\/span>It executes script code in the visitor&#8217;s browser. In the case of CampaignSuite, this is always a Javascript code.<\/p>\n\n\n\n<p><span style=\"text-decoration: underline;\"><strong>Server Side<\/strong><br><\/span>Executes script code on the server. This has the advantage that Server Side calls can also be performed if the visitor has not been on the website for a long time, such as with successful payments. These are then executed &#8216;under water&#8217; on the server.<\/p>\n\n\n\n<p>In addition, each block has the ability to map parameters. The left column shows the available parameter values \u200b\u200b(this can vary per provider) and the right column shows all available form fields and various other values \u200b\u200bthat can be used.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Open input fields<\/h3>\n\n\n\n<p>Both columns have the option of showing an open input field. In this field you can enter your own value instead of the value from one of the indicated options.<br>In the left column this is the last option in the dropdown called <strong>Add Custom Key<\/strong> and in the right column it is the last option in the dropdown called <strong>Add Custom Value<\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"833\" height=\"138\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_custom_key.png\" alt=\"\" class=\"wp-image-7860\" srcset=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_custom_key.png 833w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_custom_key-300x50.png 300w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_custom_key-768x127.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Nesting key values<\/h4>\n\n\n\n<p>In some cases, arrays (collections) must be used in, for example, Client Side calls. The image below shows an example of such a collection:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;script&gt;\nwindow.dataLayer = window.dataLayer || &#91;];\ndataLayer.push({\n  'event': 'test_event',\n  'transactionProducts': &#91;\n    {\n      'sku': 'DD44',\n      'name': 'T-Shirt',\n      'price': 11.99\n    },\n    {\n      'sku': 'AA1243544',\n      'name': 'Socks'\n      'price': 9.99\n    }\n  ]\n});\n&lt;\/script&gt;<\/code><\/pre>\n\n\n\n<p>It is clear here that <strong>transactionProducts<\/strong> is a collection of products. This can be done by linking keys with a period. It then looks like this in the mapping of a measurement:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_nested_mapping.png\" alt=\" \" class=\"wp-image-7868\" width=\"826\" height=\"484\" srcset=\"https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_nested_mapping.png 858w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_nested_mapping-300x176.png 300w, https:\/\/docs.campaignsuite.nl\/wp-content\/uploads\/2022\/10\/measurement_nested_mapping-768x450.png 768w\" sizes=\"auto, (max-width: 826px) 100vw, 826px\" \/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>As soon as an event type has been chosen and one or more providers have been selected, a block will appear for each provider with options to map fields. In fact, here you are going to set which parameters should have which values \u200b\u200bin the Client Side or Server Side call. Each block contains an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":7768,"menu_order":3,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-7846","docs","type-docs","status-publish","hentry","no-post-thumbnail"],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7846","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=7846"}],"version-history":[{"count":1,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7846\/revisions"}],"predecessor-version":[{"id":7872,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7846\/revisions\/7872"}],"up":[{"embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/docs\/7768"}],"wp:attachment":[{"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/media?parent=7846"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/docs.campaignsuite.nl\/en\/wp-json\/wp\/v2\/doc_tag?post=7846"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}