rudderlabs / gatsby-plugin-rudderstack

Gatsby plugin to send customer event data to RudderStack
http://rudderstack.com/
MIT License
3 stars 4 forks source link

Gatsby Plugin Initial Build. [Sends data directly to Rudderstack from Gatsby Website] #2

Closed cwray-tech closed 3 years ago

cwray-tech commented 3 years ago

This is the initial pull request for the issue: https://github.com/rudderlabs/rudder-server/issues/655

This is a Gatsby plugin that is ready for better in-depth testing. Once it has been thoroughly tested, it can also be published on NPM and Yarn.

The example directory is a Gatsby website that is set up. Follow the Readme instructions to run the website on your local machine and test!

Type of change

thtmnisamnstr commented 3 years ago

@cwray-tech I can't get the example project to run in develop or build right now. A couple of issues, 1) There are 2 PagesQuery calls, 2) it cannot find module './src/templates/dog-template.js'.

I'll continue testing on this tomorrow.

cwray-tech commented 3 years ago

@thtmnisamnstr

I was getting those errors, but what I had to do is run Gatsby clean and then Gatsby develop and it worked, but I will remove that directory and create a fresh site. It’s really weird though that it’s giving you that error.

Also can you point me to where I am calling the pages analytics twice?

Just to let you know the Gatsby API files in the root directory are generated with babel. The only 2 files that I wrote code in are in the src directory.

thtmnisamnstr commented 3 years ago

@cwray-tech If I get the error again tomorrow, I'll let you know where. I'm pretty sure the double call wasn't the issue though. I think it was the missing template.

cwray-tech commented 3 years ago

https://www.loom.com/share/f377f968bf634fcab63498c03f247d43

I updated the example website.