Skip to content

Commit

Permalink
chore(campaign-tracker): added image and improved readme
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnvdbrug committed Nov 27, 2024
1 parent c28d063 commit 1e7f221
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Binary file added docs-website/public/plugin-images/campaigns.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 9 additions & 5 deletions packages/vendure-plugin-campaign-tracker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

### [Official documentation here](https://pinelab-plugins.com/plugin/vendure-plugin-campaign-tracker)

Vendure plugin to track revenue per campaign, so that you can compare different campaigns from different sources.
To track campaigns, your storefront should send the unique campaign code to Vendure on a page visit:
Vendure plugin to track revenue per campaign server side, so that you can compare different campaigns from different sources.
To track campaigns:

- Pass a campaign code in the url, e.g. `my-website.com?ref=summer-sale-ad`. This URL is then included in your ads or email campaigns.
- Or, set a fixed campaign code for a landing page. For example, all visits to page `/sale-landing` will get the campaign code `sale-landing`
- Create a campaign via the Vendure admin UI
- Pass the created campaign code in the url, e.g. `my-website.com?ref=summer-sale-ad`. This URL is then included in your ads or email campaigns.
- Make your storefront send the campaign code to Vendure with the `addCampaign` mutation

![image](https://pinelab-plugins.com/plugin-images/campaigns.jpeg)

## Getting started

Expand All @@ -19,7 +22,8 @@ import { CampaignTrackerPlugin, LastInteractionAttribution } from '@pinelab/vend
plugins: [
CampaignTrackerPlugin.init({
// Pick an attribution model. Choose from `LastInteractionAttribution`, `FirstInteractionAttribution`, `LinearAttribution`
// Or, implement your own by implementing the AttributionModel interface
// Or, implement your own by implementing the AttributionModel interface.
// See JsDoc of each model for more information
attributionModel: new LastInteractionAttribution()
}),
AdminUiPlugin.init({
Expand Down

0 comments on commit 1e7f221

Please sign in to comment.