An overview of the backend
The information on this page is not relevant for you if you are only looking to implement this solution on your website. The information below is provided to explain how the backend parts of the solution work, and how you can access the backend parts of this implementation. assisting in the maintenance of this solution long term.
Once the instructions for How to setup the frontend and How to setup the backend have been completed the interactive parts of the solution will be setup on your website. That is to say that the HTML, CSS and Javascript for this solution will be in place in your application and you will have added the necessary tags, triggers and variables in to your GTM Web Container to handle the events dispatched by the frontend component on your page.
When you interact with the frontend component, you select a rating and press the 'Send feedback' button. The component's Javascript will then dispatch a GTM event to window.dataLayer
and the GTM Triggers in the website's GTM Web Container will handle that event. This allows us to process that data in GTM and send it on to the backend parts of this solution.
Server side GTM container
The solution uses a server side GTM container. The name of the container is Research Surveys - Server Container
and the container ID is GTM-5B9HNH7
. If you have permissions to view/edit/publish to the container then you will see it listed when you navigate to https://tagmanager.google.com. Please contact ben.clark@springernature.com or roland.payton.1@springernature.com to request access.
The server side container is hosted by our instance of App Engine, which is a Google Cloud service. Please see section later in this page titled "Google Cloud" for more information.
As mentioned, the consumer's GTM Web Container will handle events from the frontend component. The "Research Survey" tag in the web container will send the data via an HTTP request to a HTTP client in our GTM server side container. The code for this HTTP client can be found in the "Survey Tracking" client template within the server side container and is instantiated as the HTTP client named "Collect Survey".
The HTTP client processes the data and passes the data to a tag in the server side container that is used to push the data in to our BigQuery database table. The code for this tag can be found in the "Survey Event Tracking BigQuery" tag template within the server side container and is instantiated as the tag "Survey Event Tracking BigQuery".
The BigQuery tag also performs some filtering to ensure that we do not accept any data has not arrived from our frontend component as expected. For example, we filter out any HTTP request received that has a request path that includes gtm-msr.appspot.com
as these are naughty requests that have been sent by 3rd party software such Facebook's pixel tracking implementation.
These filters can be found in the tag template code itself and also in the GTM trigger used to move event data between the "Collect Survey" HTTP client tag and the "Survey Event Tracking BigQuery" tag.
Google Cloud
The following Google Cloud services are part of this solution:
- App Engine: https://console.cloud.google.com/appengine?project=research-surveys
- BigQuery: https://console.cloud.google.com/bigquery?project=research-surveys&ws=!1m5!1m4!4m3!1sresearch-surveys!2sfeedback_survey!3sevents
These are part of the Google Cloud Project Research Surveys
which has project ID: research-surveys
. Please contact ben.clark@springernature.com or roland.payton.1@springernature.com to request access.