Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/keen/keen-tracking-adwords-example
https://github.com/keen/keen-tracking-adwords-example
ads adwords google keen keen-io tracking tracking-pixels
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/keen/keen-tracking-adwords-example
- Owner: keen
- Created: 2018-06-14T10:33:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-06-14T13:03:58.000Z (over 6 years ago)
- Last Synced: 2024-11-09T06:38:07.263Z (about 2 months ago)
- Topics: ads, adwords, google, keen, keen-io, tracking, tracking-pixels
- Language: JavaScript
- Size: 390 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## keen-tracking-adwords-example
### Example
```javascript
import KeenTracking from 'keen-tracking';const client = new KeenTracking({
projectId: 'YOUR_PROJECT_ID',
writeKey: 'YOUR_WRITE_KEY'
});client.extendEvents(() => {
return {
page: {
title: document.title,
url: document.location.href
},
keen: {
addons: [
{
name: 'keen:url_parser',
input: {
url: 'page.url'
},
output: 'page.info'
}
]
}
}
});client.recordEvent('pageviews', {
// you can put any additional data here
});
```## Adwords URL Query String
In your Adwords Campaign, edit your Ad's [Final URL](https://support.google.com/adwords/answer/6080568):
* add any parameter that will help you identify the source of the traffic later on. For example: "?ad_id=123"## Stream
Your events should contain page.info.query_string
with values from the URL of the landing page (Final URL)![alt text](https://github.com/keen/keen-tracking-adwords-example/raw/master/demo/img/screen1.png "")
## Explorer
Run a query to see how many visitors came from the Ad
* Analysis type: count
* Event Collection: pageviews
* Add filter: page.info.query_string.ad_id = 123![alt text](https://github.com/keen/keen-tracking-adwords-example/raw/master/demo/img/screen2.png "")