simpleanalytics / roadmap

File you bugs and feature requests here
23 stars 2 forks source link

Astro plugin with partytown support #708

Open ViorelMocanu opened 8 months ago

ViorelMocanu commented 8 months ago

It would be great (and it would help promote your solution) if you could create an Astro plugin. The integration is super simple even without one, but it would probably help visibility and usage for Astro enthusiasts.

Of course, having an option to add the Light vs Full script is essential (since Astro prides itself to be as lightweight as possible).

Another required step you could take is natively integrating with Astro Partytown as an optional feature, while you're at it.

Then you could get listed as a new recipe in the Astro Integrations marketplace, Astro Integrations Guide or generic recipes section (or, ideally, everywhere).

Thank you for the wonderful product you're building!

adriaandotcom commented 8 months ago

Happy to give you a year for free in exchange for a plugin :)

ViorelMocanu commented 8 months ago

Happy to give you a year for free in exchange for a plugin :)

It's a deal! :) I'll bump this issue when I have one ready. Any preferences on coding styles or any other aspects I should be aware of before getting started?

adriaandotcom commented 8 months ago

Just use the default prettier and we're good to go!

ViorelMocanu commented 8 months ago

Just use the default prettier and we're good to go!

I'll get back to you with a link for the first version early next week. Thanks!

ViorelMocanu commented 8 months ago

Just use the default prettier and we're good to go!

Have a look and let me know what you think, please: https://github.com/ViorelMocanu/astro-simpleanalytics-plugin (it's already published on NPM here)

adriaandotcom commented 8 months ago

Thanks! Would you mind adding it to https://github.com/simpleanalytics/astro-plugin? I added you as a collaborator.

We can auto-deploy from main with something like this:

https://github.com/simpleanalytics/vue-plugin/blob/main/.github/workflows/release.yml

ViorelMocanu commented 8 months ago

Done. Imported from the original repo after tweaking the release.yml file, allowing it to work.

  1. How should I proceed with updating it going forward?
  2. Do you have any other suggestions?
  3. Do you need me to write some Integrations docs for you?

Thanks! :)

ViorelMocanu commented 7 months ago

@adriaanvanrossum any updates regarding the above? ^

adriaandotcom commented 7 months ago

Thanks for your patience. You did an outstanding job! Wow.

I added the NPM credentials. Deploy should work now.

Should we keep it consistent with our other packages and rename it to astro-plugin-simple-analytics? I am not sure if that breaks things.

If you could make a PR at https://github.com/simpleanalytics/docs/blob/master/_docs/31_integrations/00_astro.md, that would be great. Just a simple how to use would be enough.

ViorelMocanu commented 7 months ago
  1. Thanks, @adriaanvanrossum – it's my first Open Source contribution in a long time. It was fun, and I'm planning to extend the package even more soon to cover most of your API and features.
  2. Thanks for making the deploy work! I'll be testing it on the next update.
  3. Renaming the package should have no issues, but I'm confused whether this should impact both my own repo and yours, or just yours. If it's just yours, renaming the package into astro-plugin-simple-analytics and publishing it to NPM would create another independent NPM package, alongside the original. Not sure if that's what you want. Either way, I can make the change on either one or both repos, just let me know how you suggest we proceed with the renaming, please.
  4. Speaking of the two repos, what should I do with my old repo and the original NPM package? Should I make my repo private and keep it only for testing purposes on my end, so yours would be the one that's used going forward? Or just update both in parallel from now on (which would not be an issue at all for me)?
  5. Sure thing, I can write a simple guide on your 00_astro.md and make a PR with it right after we settle the points above.

Thanks for the reply!