Go to file
dependabot[bot] 207a48e1b5
chore(deps): bump the gomod-update group across 1 directory with 2 updates
Bumps the gomod-update group with 2 updates in the / directory: [github.com/foomo/sesamy-go](https://github.com/foomo/sesamy-go) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client).


Updates `github.com/foomo/sesamy-go` from 0.2.2 to 0.3.0
- [Release notes](https://github.com/foomo/sesamy-go/releases)
- [Commits](https://github.com/foomo/sesamy-go/compare/v0.2.2...v0.3.0)

Updates `google.golang.org/api` from 0.188.0 to 0.193.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.188.0...v0.193.0)

---
updated-dependencies:
- dependency-name: github.com/foomo/sesamy-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gomod-update
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: gomod-update
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-22 12:56:19 +00:00
.github chore: update configs 2024-07-10 07:02:52 +02:00
.husky feat: initial commit 2024-03-07 13:43:53 +01:00
cmd feat: add google ads conversion 2024-07-14 14:05:21 +02:00
pkg test: fix indent 2024-07-18 13:52:32 +02:00
test/tagmanager feat: add server event data 2024-07-15 11:50:34 +02:00
.editorconfig feat: initial commit 2024-03-07 13:43:53 +01:00
.gitignore chore: update configs 2024-07-10 07:02:52 +02:00
.golangci.yml feat: sesamy-cli-0.3.x 2024-07-13 21:49:39 +02:00
.goreleaser.yml chore: update configs 2024-07-10 07:02:52 +02:00
.husky.yaml feat: initial commit 2024-03-07 13:43:53 +01:00
CODE_OF_CONDUCT.md feat: initial commit 2024-03-07 13:43:53 +01:00
go.mod chore(deps): bump the gomod-update group across 1 directory with 2 updates 2024-08-22 12:56:19 +00:00
go.sum chore(deps): bump the gomod-update group across 1 directory with 2 updates 2024-08-22 12:56:19 +00:00
LICENSE feat: initial commit 2024-03-07 13:43:53 +01:00
main.go feat: add send_page_view option 2024-04-29 10:59:32 +02:00
Makefile feat: sesamy-cli-0.3.x 2024-07-13 21:49:39 +02:00
README.md docs: update usage 2024-07-18 13:57:11 +02:00
sesamy.schema.json feat: update deps 2024-07-18 13:46:03 +02:00
sesamy.yaml feat: update deps 2024-07-18 13:46:03 +02:00

Sesamy CLI

Build Status Go Report Card godoc goreleaser

CLI to keep you sane while working with GTM.

Installing

Install the latest release of the cli:

$ brew update
$ brew install foomo/tap/sesamy-cli

Usage

Add a sesamy.yaml configuration

# yaml-language-server: $schema=https://raw.githubusercontent.com/foomo/sesamy-cli/v0.3.0/sesamy.yaml
version: '1.0'

# Whether to redact the visitor ip
redactVisitorIp: true

# --- Google API settings
googleApi:
  # Single line Service Account credentials
  credentials: '{...\\n...\\n...}'
  # Path to the Service Account credentials json file
  credentialsFile: google_service_account_creds.json
  # Current API request quota (send a request to increase the quota)
  requestQuota: 15

# --- Google Tag Manager settings
googleTagManager:
  # The account id
  accountId: 6099238525
  # Web container settings
  webContainer:
    # The container tag id
    tagId: GTM-57BHX34G
    # The container id
    containerId: 175355532
    # The workspace id that should be used by the api
    workspaceId: 23
  # Server container settings
  serverContainer:
    # The container tag id
    tagId: GTM-5NWPR4QW
    # The container id
    containerId: 175348980
    # The workspace id that should be used by the api
    workspaceId: 10

# --- Google Tag settings
googleTag:
  # A tag ID is an identifier that you put on your page to load a given Google tag
  tagId: G-PZ5ELRCR31
  # Whether a page_view should be sent on initial load
  sendPageView: true
  # Enable debug mode for all user devices
  debugMode: false
  # Google Tag Manager web container settings
  webContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - PageView
          - SelectItem
  # Google Tag Manager server container settings
  serverContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - PageView
          - SelectItem
  # Google Tag Manager web container settings
  typeScript:
    # Target directory for generate files
    outputPath: path/to/target
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          ## GA4 Automatically collected events
          ## https://support.google.com/analytics/answer/9234069
          - Click
          - FileDownload
          - FirstVisit
          - FormStart
          - FormSubmit
          - PageView
          - Scroll
          - UserEngagement
          - VideoComplete
          - VideoProgress
          - VideoStart
          - ViewSearchResults
          ## Recommended events
          ## https://developers.google.com/tag-platform/gtagjs/reference/events
          - AdImpression
          - AddPaymentInfo
          - AddShippingInfo
          - AddToCart
          - AddToWishlist
          - BeginCheckout
          - CampaignDetails
          - CloseConvertLead
          - CloseUnconvertLead
          - DisqualifyLead
          - EarnVirtualMoney
          - Exception
          - GenerateLead
          - JoinGroup
          - LevelEnd
          - LevelStart
          - LevelUp
          - Login
          - PostScore
          - Purchase
          - QualifyLead
          - Refund
          - RemoveFromCart
          - ScreenView
          - Search
          - SelectContent
          - SelectItem
          - SelectPromotion
          - SessionStart
          - Share
          - SignUp
          - SpendVirtualCurrency
          - TutorialBegin
          - TutorialComplete
          - UnlockAchievement
          - ViewCart
          - ViewItem
          - ViewItemList
          - ViewPromotion
          - WorkingLead

# --- Google Analytics settings
googleAnalytics:
  # Enable provider
  enabled: true
  # Google Tag Manager web container settings
  webContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - PageView
          - SelectItem
  # Google Tag Manager server container settings
  serverContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - PageView
          - SelectItem

# --- Google Ads
googleAds:
  # Enable provider
  enabled: true
  # Google Ads Conversion settings
  conversion:
    # Google Ads Conversion Tracking ID
    conversionId: ''
    # Google Ads Conversion Tracking Label
    conversionLabel: ''
    # Google Tag Manager server container settings
    serverContainer:
      # Contemplate package config for generated events
      packages:
        - path: github.com/foomo/sesamy-go/pkg/event
          types:
            - AddToCart
            - Purchase

# --- Conversion Linker settings
conversionLinker:
  # Enable provider
  enabled: true

# --- Umami settings
umami:
  # Enable provider
  enabled: true
  # Enter an optional fixed domain to override event data
  domain: your-domain.com
  # Paste ID for your website from the Umami settings
  websiteId: ''
  # Endpoint url of the umami api
  endpointUrl: https://umami.your-domain.com
  # Google Tag Manager server container settings
  serverContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - PageView
          - SelectItem

# --- Facebook
# https://developers.facebook.com/docs/marketing-api/conversions-api/guides/gtm-server-side
facebook:
  # Enable provider
  enabled: true
  # Facebook pixel id
  pixelId: ''
  # To use the Conversions API, you need an access token.
  apiAccessToken: ''
  # Code used to verify that your server events are received correctly by Conversions API
  testEventToken: ''
  # Google Tag Manager server container settings
  serverContainer:
    # Contemplate package config for generated events
    packages:
      - path: github.com/foomo/sesamy-go/pkg/event
        types:
          - AddPaymentInfo
          - AddToCart
          - AddToWishlist
          - PageView
          - Purchase
          - Search
          - BeginCheckout
          - GenerateLead
          - ViewItem

Caveats

You might need to increase your Google Tag Manager API quotas, since they are limited to 15 r/m by default.

How to Contribute

Make a pull request...

License

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