-
Notifications
You must be signed in to change notification settings - Fork 6
Add Amplitude plugin v1.1.0 for monitoring product analytics data #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
conor-richey
wants to merge
2
commits into
squaredup:main
Choose a base branch
from
conor-richey:add-amplitude-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| { | ||
| "steps": [ | ||
| { | ||
| "displayName": "Authenticate", | ||
| "dataStream": { | ||
| "name": "validateAuth" | ||
| }, | ||
| "required": true, | ||
| "error": "Could not authenticate with Amplitude. Check that your API key and secret key are correct, and that the correct region (US/EU) is selected.", | ||
| "success": "Connected to Amplitude successfully." | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| [ | ||
| { | ||
| "name": "Amplitude Event Type", | ||
| "sourceType": "Amplitude Event Type", | ||
| "icon": "bolt", | ||
| "singular": "Event Type", | ||
| "plural": "Event Types" | ||
| }, | ||
| { | ||
| "name": "Amplitude Cohort", | ||
| "sourceType": "Amplitude Cohort", | ||
| "icon": "users", | ||
| "singular": "Cohort", | ||
| "plural": "Cohorts" | ||
| } | ||
| ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "name": "activeUsersHistory", | ||
| "displayName": "Active Users History", | ||
| "description": "Daily active or new user counts over time", | ||
| "tags": ["Analytics", "Users"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/2/users", | ||
| "getArgs": [ | ||
| { "key": "start", "value": "{{timeframe.start.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "end", "value": "{{timeframe.end.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "i", "value": "1" }, | ||
| { "key": "m", "value": "{{metric}}" } | ||
| ], | ||
| "postRequestScript": "activeUsersHistory.js" | ||
| }, | ||
| "matches": "none", | ||
| "ui": [ | ||
| { | ||
| "type": "choiceChips", | ||
| "name": "metric", | ||
| "label": "Metric", | ||
| "options": [ | ||
| { "value": "active", "label": "Active Users" }, | ||
| { "value": "new", "label": "New Users" } | ||
| ], | ||
| "default": "active" | ||
| } | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "users", | ||
| "displayName": "Users", | ||
| "shape": "number", | ||
| "role": "value" | ||
| } | ||
| ], | ||
| "timeframes": [ | ||
| "last7days", | ||
| "last30days", | ||
| "thisMonth", | ||
| "lastMonth", | ||
| "thisQuarter", | ||
| "lastQuarter", | ||
| "thisYear", | ||
| "lastYear" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| { | ||
| "name": "cohortEventHistory", | ||
| "displayName": "Cohort Event History", | ||
| "description": "Daily count of a chosen event fired by a cohort's members", | ||
| "tags": ["Analytics", "Events", "Cohorts"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/2/events/segmentation", | ||
| "getArgs": [ | ||
| { "key": "e", "value": "{{JSON.stringify({event_type: eventType && eventType[0] && eventType[0].value})}}" }, | ||
| { "key": "s", "value": "{{JSON.stringify([{prop: 'userdata_cohort', op: 'is', values: [object.rawId]}])}}" }, | ||
| { "key": "start", "value": "{{timeframe.start.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "end", "value": "{{timeframe.end.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "i", "value": "1" }, | ||
| { "key": "m", "value": "totals" } | ||
| ], | ||
| "postRequestScript": "cohortEventHistory.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "oneOf", "values": ["Amplitude Cohort"] } }, | ||
| "ui": [ | ||
| { | ||
| "type": "autocomplete", | ||
| "name": "eventType", | ||
| "label": "Event", | ||
| "data": { | ||
| "source": "dataStream", | ||
| "dataStreamName": "eventTypes", | ||
| "dataSourceConfig": {} | ||
| }, | ||
| "validation": { "required": true } | ||
| } | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "eventCount", | ||
| "displayName": "Event Count", | ||
| "shape": "number", | ||
| "role": "value" | ||
| } | ||
| ], | ||
| "timeframes": [ | ||
| "last7days", | ||
| "last30days", | ||
| "thisMonth", | ||
| "lastMonth", | ||
| "thisQuarter", | ||
| "lastQuarter", | ||
| "thisYear", | ||
| "lastYear" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "name": "cohorts", | ||
| "displayName": "Cohorts", | ||
| "description": "Behavioral cohorts defined in the project", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/3/cohorts", | ||
| "pathToData": "cohorts" | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { | ||
| "name": "id", | ||
| "displayName": "ID", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Name", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "description", | ||
| "displayName": "Description" | ||
| }, | ||
| { | ||
| "name": "size", | ||
| "displayName": "Size", | ||
| "shape": "number" | ||
| }, | ||
| { | ||
| "name": "type", | ||
| "displayName": "Cohort Type", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "published", | ||
| "displayName": "Published", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "archived", | ||
| "displayName": "Archived", | ||
| "shape": "boolean" | ||
| }, | ||
| { | ||
| "name": "lastComputed", | ||
| "displayName": "Last Computed", | ||
| "shape": "date" | ||
| }, | ||
| { | ||
| "name": "createdAt", | ||
| "displayName": "Created", | ||
| "shape": "date" | ||
| } | ||
| ], | ||
| "timeframes": false, | ||
| "visibility": { | ||
| "type": "hidden" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| { | ||
| "name": "eventCountHistory", | ||
| "displayName": "Event Count History", | ||
| "description": "Daily count of a specific event's occurrences", | ||
| "tags": ["Analytics", "Events"], | ||
| "baseDataSourceName": "httpRequestScopedSingle", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/2/events/segmentation", | ||
| "getArgs": [ | ||
| { "key": "e", "value": "{{JSON.stringify(groupByProperty && groupByProperty[0] ? {event_type: object.rawId, group_by: [{type: 'event', value: groupByProperty[0].value}]} : {event_type: object.rawId})}}" }, | ||
| { "key": "start", "value": "{{timeframe.start.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "end", "value": "{{timeframe.end.slice(0,10).replace(/-/g,'')}}" }, | ||
| { "key": "i", "value": "1" }, | ||
| { "key": "m", "value": "{{metric}}" } | ||
| ], | ||
| "postRequestScript": "eventCountHistory.js" | ||
| }, | ||
| "matches": { "sourceType": { "type": "oneOf", "values": ["Amplitude Event Type"] } }, | ||
| "ui": [ | ||
| { | ||
| "type": "choiceChips", | ||
| "name": "metric", | ||
| "label": "Metric", | ||
| "options": [ | ||
| { "value": "totals", "label": "Total Events" }, | ||
| { "value": "uniques", "label": "Unique Users" } | ||
| ], | ||
| "default": "totals" | ||
| }, | ||
| { | ||
| "type": "autocomplete", | ||
| "name": "groupByProperty", | ||
| "label": "Group by property (optional)", | ||
| "data": { | ||
| "source": "dataStream", | ||
| "dataStreamName": "eventProperties", | ||
| "dataSourceConfig": {} | ||
| } | ||
| } | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "name": "date", | ||
| "displayName": "Date", | ||
| "shape": "date", | ||
| "role": "timestamp" | ||
| }, | ||
| { | ||
| "name": "eventCount", | ||
| "displayName": "Event Count", | ||
| "shape": "number", | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "groupValue", | ||
| "displayName": "Property Value", | ||
| "shape": "string" | ||
| } | ||
| ], | ||
| "timeframes": [ | ||
| "last7days", | ||
| "last30days", | ||
| "thisMonth", | ||
| "lastMonth", | ||
| "thisQuarter", | ||
| "lastQuarter", | ||
| "thisYear", | ||
| "lastYear" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| { | ||
| "name": "eventProperties", | ||
| "displayName": "Event Properties", | ||
| "description": "Event properties defined in the project's taxonomy schema", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/2/taxonomy/event-property", | ||
| "pathToData": "data", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { | ||
| "name": "event_property", | ||
| "displayName": "Event Property", | ||
| "visible": false, | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Name", | ||
| "computed": true, | ||
| "valueExpression": "{{ $['event_property'] }}", | ||
| "role": "label" | ||
| }, | ||
| { | ||
| "name": "description", | ||
| "displayName": "Description" | ||
| }, | ||
| { | ||
| "name": "type", | ||
| "displayName": "Type" | ||
| } | ||
| ], | ||
| "timeframes": false, | ||
| "visibility": { | ||
| "type": "hidden" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| { | ||
| "name": "eventTypes", | ||
| "displayName": "Event Types", | ||
| "description": "Event types defined in the project's taxonomy schema", | ||
| "tags": ["Analytics"], | ||
| "baseDataSourceName": "httpRequestUnscoped", | ||
| "config": { | ||
| "httpMethod": "get", | ||
| "endpointPath": "api/2/taxonomy/event", | ||
| "pathToData": "data", | ||
| "expandInnerObjects": true | ||
| }, | ||
| "matches": "none", | ||
| "metadata": [ | ||
| { | ||
| "name": "event_type", | ||
| "displayName": "Event Type", | ||
| "visible": false, | ||
| "role": "value" | ||
| }, | ||
| { | ||
| "name": "display_name", | ||
| "displayName": "Display Name", | ||
| "visible": false | ||
| }, | ||
| { | ||
| "name": "name", | ||
| "displayName": "Name", | ||
| "computed": true, | ||
| "valueExpression": "{{ $['display_name']?.__isNone ? $['event_type'] : $['display_name'] }}", | ||
| "role": "label" | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }, | ||
| { | ||
| "name": "description", | ||
| "displayName": "Description" | ||
| }, | ||
| { | ||
| "name": "category.name", | ||
| "displayName": "Category" | ||
| }, | ||
| { | ||
| "name": "is_active", | ||
| "displayName": "Active", | ||
| "shape": "boolean" | ||
| } | ||
| ], | ||
| "timeframes": false, | ||
| "visibility": { | ||
| "type": "hidden" | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.