medusa-plugin-segment

1.3.8 • Public • Published

Segment

Track essential commerce analytics with Segment.

Segment Plugin Documentation | Medusa Website | Medusa Repository

Features

  • Automatic analytics tracking for events related to Orders, Swaps, and Claims.
  • Flexibility to track analytics for custom events or operations.

Prerequisites


How to Install

1. Run the following command in the directory of the Medusa backend:

npm install medusa-plugin-segment

2. Set the following environment variable in .env:

SEGMENT_WRITE_KEY=<YOUR_SEGMENT_WRITE_KEY>

3. In medusa-config.js add the following at the end of the plugins array:

const plugins = [
  // ...
  {
    resolve: `medusa-plugin-segment`,
    options: {
      write_key: process.env.SEGMENT_WRITE_KEY,
    },
  },
]

Test the Plugin

1. Run the following command in the directory of the Medusa backend to run the backend:

npm run start

2. Place an order using a storefront or the Store APIs. You should see the event tracked in Segment.


Additional Resources

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.27-meili.420meili
1.1.27-meilis.371meilis
2.0.0-202303202103310canary
1.3.8-snapshot-202407180830160snapshot
1.3.8-preview-202405051158070preview
1.3.8-next-202405051146100next
1.3.7-beta-202307052111010beta
1.3.5-rc.00rc
1.3.2-alpha.00alpha
1.3.1-test.00test
1.3.1-test-release.00test-release
1.3.1-staging-202212201103090staging
1.3.1-nxt.00nxt
1.3.1-fix-1749.2250fix-1749
1.1.39-qs-client.260qs-client
1.1.38-alpha.130tax-api
1.3.8449latest
1.3.1-swap-prod-search-202212161018231swap-prod-search
1.3.1-next-1-3-6.01next-1-3-6
1.2.2-dev.561dev
1.3.1-alp.00alp

Version History

VersionDownloads (Last 7 Days)Published
1.3.8449
1.3.8-snapshot-202407180830160
1.3.8-preview-202405051158070
1.3.8-next-202405051146100
1.3.8-next-202404301214021
1.3.8-snapshot-202404261122140
1.3.8-next-202401081455100
1.3.8-snapshot-202401081326340
1.3.8-snapshot-202401081259190
1.3.8-snapshot-202401081236370
1.3.8-snapshot-202401081000131
1.3.7-snapshot-202307111911560
1.3.748
1.3.7-next-202307111823170
1.3.7-next-202307110703290
1.3.7-next-202307101818350
1.3.7-next-202307101648240
1.3.7-snapshot-202307101605250
1.3.7-snapshot-202307101546470
1.3.7-snapshot-202307101531370
1.3.7-snapshot-202307101249170
1.3.7-beta-202307052111010
1.3.7-snapshot-202307050826150
1.3.7-snapshot-202307041517440
1.3.7-snapshot-202307041333030
1.3.7-snapshot-202306301135020
1.3.7-snapshot-202306301028170
1.3.7-next-202306300734290
1.3.7-next-202306291458410
1.3.7-next-202306291336020
1.3.7-snapshot-202306291152290
1.3.6-beta-202306191703490
1.3.6-beta-202306191652310
1.3.6-snapshot-202306191156040
1.3.6-snapshot-202306191026370
1.3.6-beta-202306181939380
1.3.6-snapshot-202306181339080
1.3.60
1.3.6-next-202306171709150
1.3.6-snapshot-202306171626340
1.3.6-snapshot-202306161514040
1.3.6-snapshot-202306161206230
1.3.6-snapshot-202306161123080
1.3.6-next-202306160938020
1.3.6-snapshot-202306160900440
1.3.6-snapshot-202306160848590
1.3.6-snapshot-202306160752510
1.3.6-snapshot-202306160745140
1.3.6-snapshot-202306160737440
1.3.6-snapshot-202306160727350
1.3.6-snapshot-202306160725120
1.3.6-snapshot-202306160644420
1.3.6-snapshot-202306152047470
1.3.6-snapshot-202306151936030
1.3.6-snapshot-202306151913361
1.3.6-snapshot-202306151826211
1.3.6-next-202306151750340
1.3.6-snapshot-202306151436011
1.3.6-snapshot-202306151228000
1.3.6-snapshot-202306151203130
1.3.6-snapshot-202306151034010
1.3.6-snapshot-202306141624310
1.3.6-snapshot-202306141549061
1.3.6-snapshot-202306141502180
1.3.6-snapshot-202306141408080
1.3.6-next-202306141334560
1.3.6-snapshot-202306141258191
1.3.6-next-202305300753450
1.3.50
1.3.5-rc.00
1.3.5-next-202303240758230
1.3.5-next-202303230834461
1.3.5-next-202303222039450
1.3.5-ci-issue-202303221902220
1.3.5-next-202303221200580
2.0.0-next-202303220943120
2.0.0-next-202303220938500
2.0.0-next-202303211900300
2.0.0-next-202303211751130
2.0.0-next-202303211455350
2.0.0-202303202103310
2.0.0-snapshot-202303201729400
2.0.0-next-202303192033510
2.0.0-next-202303190956590
2.0.0-next-202303171523500
2.0.0-next-202303170922430
2.0.0-next-202303161816320
2.0.0-next-202303161806170
2.0.0-next-202303161553530
2.0.0-next-202303161535230
2.0.0-next-202303161520190
2.0.0-next-202303161446191
2.0.0-next-202303160953010
2.0.0-next-202303160920431
2.0.0-next-202303160858340
2.0.0-next-202303160838061
2.0.0-next-202303160813160
2.0.0-next-202303151756090
2.0.0-next-202303151515580
2.0.0-next-202303151225100
2.0.0-next-202303151204480
2.0.0-next-202303151135070
2.0.0-next-202303151122080
2.0.0-next-202303150917490
2.0.0-next-202303141619100
2.0.0-next-202303141113260
2.0.0-next-202303141049200
2.0.0-next-202303141025240
2.0.0-next-202303140959260
2.0.0-next-202303140940410
2.0.0-next-202303140908340
2.0.0-next-202303131805330
2.0.0-snapshot-202303131754430
2.0.0-next-202303131735020
2.0.0-snapshot-202303131628170
2.0.0-next-202303131426340
2.0.0-next-202303131412480
2.0.0-next-202303131307000
2.0.0-next-202303131227580
2.0.0-next-202303121208360
2.0.0-next-202303120849230
2.0.0-next-202303101447440
2.0.0-next-202303101413560
2.0.0-next-202303101345221
2.0.0-next-202303101216040
1.3.5-next-202303101019121
1.3.5-next-202303100942180
1.3.5-next-202303091732291
1.3.5-next-202303091722030
1.3.5-next-202303091712180
1.3.5-next-202303091548300
1.3.5-next-202303091436340
1.3.5-next-202303091210321
1.3.5-snapshot-202303090821120
1.3.5-next-202303081601140
1.3.5-next-202303081545320
1.3.5-next-202303081513560
1.3.5-next-202303081241360
1.3.5-202303072000250
1.3.5-202303071956090
1.3.5-next-202303071915090
1.3.5-next-202303071853321
1.3.5-next-202303071846310
1.3.5-next-202303071615300
1.3.5-next-202303071459210
1.3.5-next-202303071347360
1.3.5-snapshot-202303071317421
1.3.5-snapshot-202303071258540
1.3.5-snapshot-202303071247040
1.3.5-next-202303071235020
1.3.5-next-202303071224070
1.3.5-next-202303071216371
1.3.5-next-202303071156340
1.3.5-next-202303071059470
1.3.5-next-202303070938280
1.3.5-next-202303070908540
1.3.5-next-202303061611011
1.3.5-next-202303061453410
1.3.5-next-202303051722071
1.3.5-next-202303051521300
1.3.5-next-202303041442070
1.3.5-next-202303031106001
1.3.5-next-202303030914310
1.3.5-snapshot-202303022109240
1.3.5-next-202303021707240
1.3.5-next-202303021537211
1.3.5-snapshot-202303021521380
1.3.5-snapshot-202303021511151
1.3.5-next-202303011803290
1.3.5-next-202303011737460
1.3.5-next-202303011718370
1.3.5-next-202302281823320
1.3.5-next-202302281748300
1.3.5-next-202302281613240
1.3.5-next-202302281532340
1.3.5-next-202302281029010
1.3.5-next-202302280947230
1.3.5-next-202302280853141
1.3.5-next-202302261247360
1.3.5-next-202302261212120
1.3.5-next-202302240851280
1.3.5-next-202302231613411
1.3.5-next-202302231336030
1.3.5-next-202302221644100
1.3.5-next-202302221631160
1.3.5-next-202302221547470
1.3.5-next-202302221447551
1.3.5-next-202302211615550
1.3.5-next-202302211024170
1.3.5-snapshot-202302151450500
1.3.4-next-202302141632050
1.3.410
1.3.4-next-202302141150501
1.3.4-snapshot-202302141026320
1.3.4-next-202302140956390
1.3.4-next-202302140850070
1.3.4-next-202302140828390
1.3.4-snapshot-202302140805550
1.3.4-next-202302131757540
1.3.4-next-202302131703300
1.3.4-next-202302131626070
1.3.4-next-202302131539000
1.3.4-next-202302131533040
1.3.4-snapshot-202302131048470
1.3.4-snapshot-202302121100420
1.3.4-next-202302101539180
1.3.4-snapshot-202302101423200
1.3.4-snapshot-202302101204480
1.3.4-next-202302100831091
1.3.4-next-202302091656321
1.3.4-snapshot-202302091145120
1.3.30
1.3.3-next-202302081806190
1.3.3-next-202302081704210
1.3.3-next-202302081636270
1.3.3-next-202302081306180
1.3.3-next-202302081241220
1.3.3-next-202302081217260
1.3.3-snapshot-202302080951340
1.3.3-next-202302071820040
1.3.3-snapshot-202301261856220
1.3.20
1.3.2-next-202301181643430
1.3.2-next-202301181233190
1.3.2-next-202301180951280
1.3.2-next-202301180923550
1.3.2-next-202301171519330
1.3.2-next-202301171426300
1.3.2-next-202301162322520
1.3.2-next-202301161925580
1.3.2-next-202301161836330
1.3.2-next-202301161604271
1.3.2-snapshot-202301161038160
1.3.2-next-202301160902181
1.3.2-next-202301151909161
1.3.2-next-202301151841240
1.3.2-next-202301151619240
1.3.2-alpha.00
1.3.1-next-202212221455130
1.3.11
1.3.1-next-202212221355300
1.3.1-next-202212221225231
1.3.1-next-202212221038070
1.3.1-next-202212220948580
1.3.1-next-202212220938320
1.3.1-next-202212211413550
1.3.1-next-202212202129190
1.3.1-next-202212201741590
1.3.1-next-202212201126030
1.3.1-staging-202212201103090
1.3.1-staging-202212200911211
1.3.1-staging-202212200905270
1.3.1-staging-202212191909001
1.3.1-staging-202212191443270
1.3.1-staging-202212190853180
1.3.1-staging-202212181915511
1.3.1-staging-202212161919580
1.3.1-staging-202212161120470
1.3.1-swap-prod-search-202212161018231
1.3.1-staging-202212160926020
1.3.1-staging-202212151916511
1.3.1-snapshot-202212151501570
1.3.1-staging-202212151311091
1.3.1-snapshot-202212151144060
1.3.1-staging-202212150813020
1.3.1-staging-202212150750541
0.0.0-snapshot-202210051454370
0.0.0-snapshot-202210051051170
1.3.1-alp.00
1.3.1-alpha.01
1.3.1-test-release.00
1.3.1-test.00
1.3.1-nxt.00
1.3.1-next-1-3-6.01
1.3.1-next.00
2.0.0-next.00
1.3.1-nxt.1291
1.3.1-nxt.1300
1.3.1-export-api.1081
1.3.1-next.1080
1.3.1-next.1010
1.3.1-next.1000
1.3.1-fix-1749.2250
1.3.1-next.440
1.3.1-next.410
1.3.1-next.351
1.3.1-next.270
1.3.1-next.260
1.3.1-next.240
1.3.1-next.140
1.3.00
1.1.44-next.00
1.1.430
1.2.2-dev.561
1.2.2-dev.530
1.2.2-dev.470
1.2.10
1.2.00
1.1.420
1.1.411
1.1.39-qs-client.260
1.1.38-alpha.130
1.1.401
1.1.391
1.1.380
1.1.370
1.1.360
1.1.350
1.1.340
1.1.330
1.1.320
1.1.31-next.00
1.1.29-next.460
1.1.290
1.1.29-next.190
1.1.28-meilis.01
1.1.27-meilis.371
1.1.27-meili.420
1.1.27-meili.410
1.1.27-meili.400
1.1.27-meili.371
1.1.280
1.1.270
1.1.27-next.400
1.1.27-next.360
1.1.260
1.1.250
1.1.241
1.1.230
1.1.21-next.160
1.1.21-alpha.90
1.1.220
1.1.21-alpha.61
1.1.210
1.1.21-next.101
1.1.21-next.70
1.1.21-alpha.40
1.1.200
1.1.17-next.00
1.1.15-next.90
1.1.150
1.1.140
1.1.13-next.101
1.1.121
1.1.11-next.50
1.1.110
1.1.11-next.00
1.1.100
1.1.90
1.1.80
1.1.70
1.1.5-next.230
1.1.5-alpha.160
1.1.50
1.1.5-next.31
1.1.5-next.20
1.1.5-next.10
1.1.5-next.00
1.1.5-alpha.20
1.1.40
1.1.4-next.230
1.1.4-next.220
1.1.4-next.210
1.1.30
1.1.3-alpha.20
1.1.3-alpha.10
1.1.20
1.1.10
1.1.00
1.0.14-alpha.2100
1.0.14-alpha.2090
1.0.14-alpha.1970
1.0.14-alpha.1930
1.0.14-alpha.1860
1.0.14-alpha.1770
1.0.160
1.0.14-alpha.350
1.0.150
1.0.14-alpha.330
1.0.140
1.0.130
1.0.120
1.0.12-alpha.440
1.0.12-alpha.4460
1.0.110
1.0.100
1.0.70
1.0.10
1.0.1-beta.00
1.0.1-alpha.10
1.0.00
1.0.0-alpha.300
1.0.0-alpha.270
1.0.0-alpha.260
1.0.0-alpha.240
1.0.0-alpha.30

Package Sidebar

Install

npm i medusa-plugin-segment

Weekly Downloads

566

Version

1.3.8

License

MIT

Unpacked Size

24.9 kB

Total Files

8

Last publish

Collaborators

  • sebrindom
  • oliverjuhl