The solute-Click-ID must therefore be sent to our tracking server when a conversion takes place. To simplify this process, we offer two small javascript snippets that do the sending of the solute-Click-ID – the Javascript must be integrated for the offer page | entry page as well as on the order confirmation page.
The Landing page Javascript is implemented on the offer pages. It checks whether a parameter "soluteclid" is contained in the parameters of the landing page URL. If this is the case, the landing page URL is stored in the browser's LocalStorage and is also sent to solute.
<script> (function soluteLandingTracking(){ if (location.href.indexOf("soluteclid") < 0) return; localStorage.setItem("soluteclid", (new Date()).getTime()+" "+location.href); var url = "https://cmodul.solutenetwork.com/landing"; url += "?url=" + encodeURIComponent(location.href); var req = new XMLHttpRequest(); req.open("GET", url); req.send(); })(); </script>
The Conversion page Javascript is implemented on the order confirmation page - the page that is displayed after a purchase has been made.
A conversion should always be assigned a monetary (net) value (shopping cart amount excluding VAT and shipping costs), as well as a unique ID to the order process (Order-ID), so that you have a reference to your own conversion records. We recommend a hash your order ID. An optional attribution factor can also be specified. Through the (attribution) factor, you can specify the share of solute in the purchase. If you don't want to use the factor, just submit the value 1 as factor. Pay attention to the use of a tracking switch! A tracking switch ensures the correct allocation of sales and conversions within the customer journey. The tracking switch manages code snippets from different providers and controls them according to rules defined by the shop.
<script> soluteConversionTracking({ VALUE: "123.98", ORDER_ID: "abc-987", FACTOR: "1", }); function soluteConversionTracking(data) { var ttl = 1000*60*60*24*30; var a = localStorage.getItem("soluteclid"); if (!a) return; var b = a.split(" ", 2); if (parseInt(b[0])+ttl > (new Date()).getTime()) { var url = "https://cmodul.solutenetwork.com/conversion"; url += "?val=" + encodeURIComponent(data.VALUE); url += "&oid=" + encodeURIComponent(data.ORDER_ID); url += "&factor=" + encodeURIComponent(data.FACTOR); url += "&url=" + encodeURIComponent(b[1]); var req = new XMLHttpRequest(); req.open("GET", url); req.send(); } else { localStorage.removeItem("soluteclid"); } } </script>
Important: As soon as you have integrated the tracking, please let us know at config@solute.de so that we can check and activate it – otherwise the tracking will not work.
You can either take advantage of the GTM template under Tag Manager Template Gallery or the following instructions.
Attention: Conversion tracking does not work without landing page tracking.
1. Create a new tag under “Tags > New”.
2. Change “Untitled tag” to “Solute landing page”, select “Custom HTML” in the tag configuration and copy in this code snippet:
<script> (function soluteLandingTracking(){ if (location.href.indexOf("soluteclid") < 0) return; localStorage.setItem("soluteclid", (new Date()).getTime()+" "+location.href); var url = "https://cmodul.solutenetwork.com/landing"; url += "?url=" + encodeURIComponent(location.href); var req = new XMLHttpRequest(); req.open("GET", url); req.send(); })(); </script>
3. Select the corresponding trigger for product pages under Trigger. Depending on the store system, the information may be available in the DataLayer or you can determine it using the URL.
1. Create a new tag under “Tags > New”.
2. Change “Unnamed Tag” to “Solute Conversion”, select “Custom HTML” in the tag configuration and copy in this code snippet:
<script> soluteConversionTracking({ VALUE: "{{DLV_NettoSumme}}", ORDER_ID: "{{DLV_Bestellnummer}}", FACTOR: "1", }); function soluteConversionTracking(data) { var ttl = 1000*60*60*24*30; var a = localStorage.getItem("soluteclid"); if (!a) return; var b = a.split(" ", 2); if (parseInt(b[0])+ttl > (new Date()).getTime()) { var url = "https://cmodul.solutenetwork.com/conversion"; url += "?val=" + encodeURIComponent(data.VALUE); url += "&oid=" + window.btoa(encodeURIComponent(data.ORDER_ID)); url += "&factor=" + encodeURIComponent(data.FACTOR); url += "&url=" + encodeURIComponent(b[1]); var req = new XMLHttpRequest(); req.open("GET", url); req.send(); } else { localStorage.removeItem("soluteclid"); } } </script>
For the code to work, the two variables “DLV_NettoSumme” and “DLV_Bestellnummer” must be present in the Google Tag Manager. They may be labeled differently, in which case only the correct variable names need to be inserted instead of “DLV_NettoSumme” and “DLV_Bestellnummer”. If not, these must first be created under “Variables > New”. If this information is available in the DataLayer, this variable can be added as a “data layer variable” and the corresponding name (e.g: “ecommerce.purchase.actionField.id” or “ecommerce.purchase.actionField.value”, depending on the store system or the integration of the GTM). If this information is not in the DataLayer, it can usually be read as a JavaScript variable.
3. Select the appropriate trigger for the order confirmation page under Trigger. Depending on the store system, the information may be available in the DataLayer or you can determine it using the URL.
Important: As soon as you have integrated the tracking, please let us know at config@solute.de so that we can check and activate it – otherwise the tracking will not work.
Alternatively, landing and conversion calls can also be transmitted directly via an HTTP GET request. For example, from the backend of the shop software. Here, only the URL of the entry page (with parameter "soluteclid") must be transferred.
To track the call of the entry page (landing page), the URL of the entry page is passed as parameter.
URL: https://cmodul.solutenetwork.com/landing Request: GET Parameter: - url: Die URL der Einstiegsseite. Response: 204 No Content
GET https://cmodul.solutenetwork.com/landing?url=ESCAPED_URL
To track the call of the order confirmation page, the same URL of the initial page is passed again as parameter. The total value of the shopping cart and the order-ID (e.g., hash of order ID) are also transferred.
URL: https://cmodul.solutenetwork.com/conversion Request: GET Parameter: - url: Die URL der Einstiegsseite. - val: Der Gesamtwarenkorbswert (Netto-Betrag ohne Versandkosten). - oid: Eine eindeutige ID zum Bestellprozess (z.B. Hash der Bestellnummer). - factor: Optional. Anteil der solute am Kauf. Response: 204 No Content
GET https://cmodul.solutenetwork.com/conversion?url=ESCAPED_URL&val=ESCAPED_VALUE&oid=ESCAPED_ORDER_ID
Important: As soon as you have integrated the tracking, please let us know at config@solute.de so that we can check and activate it – otherwise the tracking will not work.
With the conversion tracker via CSV, the store generates a CSV file with the sales or conversions on a daily basis.
{SHOPNAME}_{TIMESTAMP}.csv