Integrating Adobe Analytics to Gatsby application | Community
Skip to main content
February 7, 2023
Solved

Integrating Adobe Analytics to Gatsby application

  • February 7, 2023
  • 1 reply
  • 770 views

Hi

How can I integrate Adobe analytics with a Gatsby application?

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Jennifer_Dungan

While I am not familiar with Gatsby, it seems to be a React based framework.

 

There may not be an "out of the box" solution, but there is always a solution. I suppose it depends on how well you work with your developers.... 

 

I assume this is a Single Page Application (SPA), so you might have to work with your developers to create a data layer (this can be leveraging Adobe's event based data layer structure, there are plugins that can leverage Google Tag Manager's data layer structure as well; or you can create your own custom data layer.

 

I haven't worked with Adobe's data layer (it didn't exist when I started tagging our sites, and I am not terribly fond of event based data layers (particularly on SPAs where the data layer will keep growing), I use a custom data layer that is replaced each time and uses custom JS events for my triggers... but this is all personal preference.. you need to choose something that works for you and your developers.

 

If you are doing an "event based" data layer, you should be able to target the pushed events (similar to how GTM works), or if you are using a custom data layer, you can work with your developers to create some custom events such as (page load start, page load finish, etc) that you can create listeners for, then target rules to fire at different parts of the loading... 

 

Here is some info on SPAs:

https://experienceleague.adobe.com/docs/analytics-learn/tutorials/implementation/spa-pages/using-best-practices-when-tracking-spa.html?lang=en (this one also uses Adobe's data layer "digitalData")

 

 

https://www.digitaldatatactics.com/index.php/2017/11/20/adobe-dtm-launch-improvements-for-single-page-apps/

 

The second one is a bit older, but might cover some of the ways in which to handle SPAs with custom events.

 

Good luck!

 

 

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
February 8, 2023

While I am not familiar with Gatsby, it seems to be a React based framework.

 

There may not be an "out of the box" solution, but there is always a solution. I suppose it depends on how well you work with your developers.... 

 

I assume this is a Single Page Application (SPA), so you might have to work with your developers to create a data layer (this can be leveraging Adobe's event based data layer structure, there are plugins that can leverage Google Tag Manager's data layer structure as well; or you can create your own custom data layer.

 

I haven't worked with Adobe's data layer (it didn't exist when I started tagging our sites, and I am not terribly fond of event based data layers (particularly on SPAs where the data layer will keep growing), I use a custom data layer that is replaced each time and uses custom JS events for my triggers... but this is all personal preference.. you need to choose something that works for you and your developers.

 

If you are doing an "event based" data layer, you should be able to target the pushed events (similar to how GTM works), or if you are using a custom data layer, you can work with your developers to create some custom events such as (page load start, page load finish, etc) that you can create listeners for, then target rules to fire at different parts of the loading... 

 

Here is some info on SPAs:

https://experienceleague.adobe.com/docs/analytics-learn/tutorials/implementation/spa-pages/using-best-practices-when-tracking-spa.html?lang=en (this one also uses Adobe's data layer "digitalData")

 

 

https://www.digitaldatatactics.com/index.php/2017/11/20/adobe-dtm-launch-improvements-for-single-page-apps/

 

The second one is a bit older, but might cover some of the ways in which to handle SPAs with custom events.

 

Good luck!