This is the sample code to help your organization integrate the GTM analytics code into Luminate Online donation forms.
This code is configured in accordance with best practices that DNL Omnimedia developed. Namely, the code structure puts wrapper head & body contents into PageBuilder reusable pages. The analytics code is also placed into PageBuilder reusable pages for ease of management and reuse in multiple wrappers.
Feel free to adapt this code to your needs. DNL Omnimedia, Inc. does not provide any guarantees with this code.
- Clone this repository
- Update
reus_analytics_head
&reus_analytics_body
files to include the id of your GTM container - Create the PageBuilder pages
reus_analytics_head
&reus_analytics_body
in Luminate online - Place the updated content into PageBuilder pages created in the previous step
- Update your wrapper code (here it lives in files that start with
reus_wrpr_
) to include the reusable PageBuilder pagesreus_analytics_head
&reus_analytics_body
in appropriate sections - Configure your GTM container to forward errors into Google Analytics on
error
event - Configure your GTM to forward transactions to Google Analytics on
transactionComplete
event; ensure that transaction is recorded only once - Configure GTM to forward
userId
data to Google Analytics, if desired - Configure Google Analytics to use new
userId
, if desired - Configure
userId
as a custom dimension in Google Analytics and configure GTM to send data to that custom dimension for more detailed reporting and data reconciliation with Luminate Online
- Enable built-in
Error Message
variable - Create a new data layer variable
numberOfErrors
that will pull in data layer valuenumberOfErrors
- Create a new GTM trigger to fire when a Custom Event
error
is detected - Create a new GTM tag to track Event in Google Analytics
- Configure event Label to pull in
{{Error Message}}
- Configure event Value to pull in
{{numberOfErrors}}
Follow this guide to configure the unique transaction tracking. Note that the article was written with assumption that the data layer uses the deprecated e-commerce object. To properly work with this code the data layer variables will have to be configured to get data from the enhanced e-commerce data layer structure.
If you run into issues with this code or need assistance implementing analytics in other Blackbaud Luminate Online module. Contact DNL Omnimedia.