Donorbox allows us to run scripts after the donation is successfully made. We can make use of this feature to track the donations as Google Adwords Conversions.
First step is to find your Google Adwords Conversion ID
Step 1
Log in to your AdWords account and go to the conversions page
Step 2
If you already have existing conversion action that you want to use with Donorbox, click on it
Expand the "Tag setup" drop-down.
Skip to Step 4
Step 3
To create a new conversion action, click on the plus icon and choose the Website option
Fill in the details as per your requirement and click the "CREATE AND CONTINUE" button
Step 4
In the next screen, you will be provided with different options to install the tag. Choose "Install the tag yourself"
Step 5
Scroll down to find the "Event Snippet" code, you will find the Adword and conversion IDs in the snippet code as shown below
Make note of the IDs which will be used in the next steps.
Insert Google Adwords conversion tracking code into your campaign
Step 6
Go to your campaign's editor
Step 7
Click on "Tracking"
Step 8
Insert the below code into the "After donations tracking code" field and replace "XXX" with the IDs copied in Step 5.
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-XXXXXXXXX"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'AW-XXXXXXXXX', {
cookie_flags: 'secure;samesite=none'
}); gtag('event', 'conversion', { 'send_to': 'AW-XXXXXXXXX/XXXXXXXXXXXXXXXXXXX', 'value': DONORBOX.donation.amount, 'currency': DONORBOX.donation.currency, 'transaction_id': DONORBOX.donation.id }); </script>
Comments
0 comments
Article is closed for comments.