Socket
Book a DemoInstallSign in
Socket

@foomo/sesamy

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foomo/sesamy

Server Side Tagging System (Sesamy)

latest
Source
npmnpm
Version
0.2.0
Version published
Maintainers
4
Created
Source

@foomo/sesamy

Server Side Tag Management System

Usage

Load gtm.js and setup window.gtag():

import { GTMScript } from '@foomo/sesamy';

export default function RootLayout({ children }: Layout) {
  return (
    <html lang="en">
    <head>
      <GTMScript id={'GTM-XXXXXXX'} />
    </head>
    <body>
    <main>{children}</main>
    </body>
    </html>
  );
}

Send event:

import { collect } from '@foomo/sesamy';

export const MyComponent = () => {
  const handleClick = () => {
    collect({
      name: 'my-event',
      params: {
        value: 'my-value'
      }
    })
  }
  return (<button onClick={handleClick}>Click</button>)
}

Code generation

If you're using Go, checkout foomo/sesamy-cli to generate events to keep your backend, frontend and Google Tag Manager in sync.

How to Contribute

Make a pull request...

This repo uses Changeset, so please run this on your PR and follow the instructions:

$ pnpm changeset

License

Distributed under MIT License, please see license file within the code for more details.

FAQs

Package last updated on 10 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts