Comments (10)
Thanks.
from gatsby-plugin-hubspot.
@wiadev are you looking it in production or development? It won't be loaded in during development.
from gatsby-plugin-hubspot.
@AustinLeeGordon is there a recommended way to test this during development then? just want to make sure the pages views and such are coming through before committing.
from gatsby-plugin-hubspot.
@MarkRich If you're using something like Netlify for hosting, you should be able to create a deploy preview from a pull request or separate branch and see the scripts being loaded.
from gatsby-plugin-hubspot.
@AustinLeeGordon I'm looking at it in development. Is there any way to check in development locally?
from gatsby-plugin-hubspot.
@MarkRich @wiadev We can add an option that will allow the script to render in development, but I don't think page views will get sent to HubSpot on a local development server. You would at least be able to check if the scripts are rendering. How does that sound?
from gatsby-plugin-hubspot.
@AustinLeeGordon Sounds great!
I need to load the hubspot form on local but since it's not loading the hsscripts, I couldn't create a form, FYI.
from gatsby-plugin-hubspot.
@wiadev @MarkRich Gotcha! We don't use the HubSpot forms on our site, so I hadn't come across that yet. Just added a productionOnly
option in v1.3.0. Update to that version and set productionOnly
to false
in the plugin options and you should be good to go! Let me know if everything works okay and I'll close this issue.
from gatsby-plugin-hubspot.
Thanks @AustinLeeGordon It works like a charm.
I have another question. I'm building the project in typescript and since hbspt is global variable, it shows hbspt as an error.
So I put the declare var hbspt: any;
at the top to resolve this but on build time, I've got the undefined hbspt error.
Do you have any suggestions?
from gatsby-plugin-hubspot.
@wiadev Awesome, thanks for the update!
I've only used TypeScript a little, so I'm not exactly sure about that. Try some of the suggestions in these SO threads:
- https://stackoverflow.com/questions/12703266/how-to-handle-warnings-for-proprietary-custom-properties-of-built-in-objects-in/12703866#12703866
- https://stackoverflow.com/questions/12709074/how-do-you-explicitly-set-a-new-property-on-window-in-typescript
from gatsby-plugin-hubspot.
Related Issues (9)
- Add Tests
- plugin stopped working HOT 4
- Plugin calls setPath and overrides referrer (causing problems for source attribution) HOT 1
- Question: Can you specify pages to ignore
- Support React 18
- Incompatible with Gatsby v5 HOT 1
- Window is not defined error HOT 3
- Reporter incorrectly destructured from onRenderBody HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gatsby-plugin-hubspot.