Follow the steps below to install Conversion Booster for Google Ads script in Shoporama
- Copy this code and replace "AW-XXXXXXXXX/YYYYYYYYYYYYYYYYYYYY" and "AW-XXXXXXXXX/ZZZZZZZZZZZZZZZZZZZZ" as well as the order value modifier 0.45 to the average order profit margin.
<!-- Start ProfitMetrics - Google Ads - (v4) -->
<script>
var pmOrderValueInclTax = Number('<{$order->getTotalPrice()|number_format:2:".":","}>');
var pmOrderValueEclTax = Number('<{$order->getTotalPriceExVat()|number_format:2:".":","}>');
var pmOrderCurrency = String('<{$webshop->getCurrency()}>');
var pmOrderId = String('<{$order->getWebshopOrderId()|escape}>');
var pmRevenueInclTax = true;
const pmLastOrderId = localStorage.getItem('pmLastOrderId');
if (!(pmLastOrderId && pmLastOrderId === pmOrderId)) {
localStorage.setItem('pmLastOrderId', pmOrderId);
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('event', 'pm_revenue', {
send_to: 'AW-XXXXXXXXX/YYYYYYYYYYYYYYYYYYYY',
value: pmRevenueInclTax ? pmOrderValueInclTax : pmOrderValueExclTax,
currency: pmOrderCurrency,
transaction_id: pmOrderId
});
gtag('event', 'pm_grossprofit', {
send_to: 'AW-XXXXXXXXX/ZZZZZZZZZZZZZZZZZZZZ',
value: pmOrderValueExclTax * 0.45,
currency: pmOrderCurrency,
transaction_id: pmOrderId
});
}
</script>
<!-- End ProfitMetrics - Google Ads --> - Copy the snippet from ProfitMetrics > Integrations > Connections > ConversionBooster for Google Ads.
-
Click "Indstillinger"
-
Click "Tema-editor"
-
Click "/thanks.html"
- Scroll to the bottom and paste the code before the final <{/script}> tag
- Click "GEM"
That's it.