GithubHelp home page GithubHelp logo

Comments (10)

wiadev avatar wiadev commented on June 4, 2024 1

Thanks.

from gatsby-plugin-hubspot.

AustinLeeGordon avatar AustinLeeGordon commented on June 4, 2024

@wiadev are you looking it in production or development? It won't be loaded in during development.

from gatsby-plugin-hubspot.

MarkRich avatar MarkRich commented on June 4, 2024

@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.

AustinLeeGordon avatar AustinLeeGordon commented on June 4, 2024

@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.

wiadev avatar wiadev commented on June 4, 2024

@AustinLeeGordon I'm looking at it in development. Is there any way to check in development locally?

from gatsby-plugin-hubspot.

AustinLeeGordon avatar AustinLeeGordon commented on June 4, 2024

@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.

wiadev avatar wiadev commented on June 4, 2024

@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.

AustinLeeGordon avatar AustinLeeGordon commented on June 4, 2024

@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.

wiadev avatar wiadev commented on June 4, 2024

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.

Screen Shot 2019-06-21 at 1 03 09 AM

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.

Screen Shot 2019-06-21 at 1 04 31 AM

Do you have any suggestions?

from gatsby-plugin-hubspot.

AustinLeeGordon avatar AustinLeeGordon commented on June 4, 2024

@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:

from gatsby-plugin-hubspot.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.