Track Google Campaigns Using Spring Web Stream

I use Spring Web Flow for one of my clients, and Post-Redirect-Get (PRG) is enabled by default for the website. Now the customer wants to enable Google Campaigns so that they can track the campaigns they run. But due to the PRG configuration, information is lost during the redirection. We have already tried to disable the PRG configuration, but this leads to problems in another thread. Is there any solution suggested for Spring web stream to track Google campaigns.

Thanks in advance.

PS: We are currently using spring -webflow-2.0.9 and Spring MVC 2.5.6

+6
source share
1 answer

We were able to solve the problem by performing a workaround. Following are the steps.

  • To add an application filter check, find all data related to Google Campaigns, such as utm_source / utm_medium / utm_campaign.
  • Once you find them in the filter, save it in the cookie application on the server side.
  • On the page where you want to add tracking, add JavaScript to check if these cookies are set.
  • If cookies are set, we call the _setCampValue () method using the Javascript mentioned in the extga.js link
  • This JS sets the __utmz cookie, which Google Analytics uses to identify campaigns.

Please find the blog link from which we used javascript to modify the __utmz cookie used by Google Campaigns.

Thanks.

+2
source

Source: https://habr.com/ru/post/949450/


All Articles