npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@concord-consulting/concord-web-analytics

v0.0.59

Published

google data tagging for org website

Downloads

17

Readme

CONCORD WEB ANALYTICS DATA TAGGING

The purpose of this repository is to maintain source code for attaching listeners that call Google Tag Manager's dataLayer to be used for data tagging and analytics on Concord's site.

Process For Development

To create new scripts:

  • Add a new script file (with a .ts file type) to the /scripts directory under either the /pages directory (if the script should be triggered based on URL change) or the /events directory (if the script should be triggered based on any other event (i.e. click, form events, etc))
  • IF A PAGE SCRIPT:
    • Add the path string to the dataLayerPageDetails method in data-layer-methods.ts and follow the pattern to include your imported method from your newly created script file.
  • IF A EVENT SCRIPT:
    • Add the exported method from your event related script into the addCustomEventHandlers method in data-layer-methods.ts

To test locally:

  • Search for the comments that say 'UNCOMMENT FOR TESTING' in main.ts
  • Make sure these two pieces of code are uncommented
    • The page scripts you can test using the console.log with the 'DataLayer' object
    • Other events can be tracked via inputting the DataLayer object into the Local Storage

To run build process locally:

  • In command line input 'npm run build'
  • This will distill all scripts imported into src/main.ts into a single file inside the /dist directory called analytics-bundle.js
  • Search the output to ensure your script is in the file

To deploy:

  • Commit and push code up to your branch ** NEED TO FIX THIS PIPELINE FLOW (as of 9/26/24) **
  • Merge code into main branch
    • This will kick off a pipeline that will build, publish, and make your code accessible via this script: <script src="https://cdn.jsdelivr.net/npm/@concord-consulting/concord-web-analytics/dist/analytics-bundle.js"></script>
    • note: This may take a few minutes after publishing to NPM to be available via jsdelivr

** ALTERNATIVE DEPLOYMENT PROCESS **

  • Run the script 'npm run release' in order to update package version and trigger a publish to NPM.
  • It may error if you're not authenticated with NPM, if this is case run npm login and follow the output in the terminal to login.
    • You may need to be added as a user in Concord's NPM account - contact Jerry Hill for access
    • You can also contact Reese Kling for publishing help.