Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
@esri/telemetry
Advanced tools
This is a vanilla JavaScript implementation of the new ArcGIS telemetry specification. It currently supports Amazon Mobile Analytics and Google Analytics
telemetry.logPageView(page)
The page variable is optional. If it is not passed in, the library will use window.location
E.g.
telemetry.logPageView('/datasets/1ef')
telemetry.logEvent(event)
IMPORTANT Do not pass a username except as event.user
. Otherwise it will not be anonymized.
E.g.
const event = {
category: 'Dataset',
action: 'Attribute Inspect',
label: 'Crimes 2016',
datasetID: '1ef',
attribute: 'crime_type',
user: 'amazing_map_woman'
}
telemetry.logEvent(event)
Workflows are meant to track a logical group of actions by a user from start to finish.
First a workflow is created with startWorkflow
. Then steps are added with stepWorkflow
. Finally a workflow is either canceled with cancelWorkflow
or completed successfully with endWorkflow
.
Workflows are tracked internally by name
so this value must not change through the life of a workflow in order for steps and duration to be tracked properly.
telemetry.startWorkflow(name)
telemetry.startWorkflow('add layer')
telemetry.stepWorkflow(name, step, details)
telemetry.stepWorkflow('add layer', 'search', 'street trees')
telemetry.cancelWorkflow(name, [details])
telemetry.cancelWorkflow('add layer')
telemetry.cancelWorkflow('search', 'back to home')
telemetry.endWorkflow(name, [details])
telemetry.endWorkflow('add layer')
telemetry.endWorkflow('add layer', 'pasadena street trees')
npm install -S @esri/telemetry
<script src="dist/Telemetry.js"></script>
<script>
const telemetry = new Telemetry({
amazon: {
userPoolID: 'us-east-1:aed3c2fe-4d28-431f-abb0-fca6e3167a25',
app: {
name: 'test',
id: '36c5713d9d75496789973403b13548fd',
version: '1.0'
}
},
google: {
dimensions: {
datasetId: 6,
attribute: 7,
serviceQuery: 8,
searchQuery: 9,
objectId: 10,
facetValue: 11
}
}
})
telemetry.logPageView()
telemetry.logEvent({category: 'test', action: 'test', label: 'test'})
</script>
amazon
when initiating the Telemetry object{
userPoolID: USER_POOL_ID,
app: {
name: APP_NAME,
id: APP_ID,
version: APP_VERSION
}
}
google: true
or an object containing the mapping for your custom dimensions and metrics
// if you are using no custom dimensions or metrics
{
google: true
}
// or if you are using optional custom dimensions and/or custom metrics
{
google: {
dimensions: {
datasetID: 1,
attribute: 2,
serviceQuery: 3
},
metrics: {
duration: 1,
size: 2
}
}
}
If you need to disable tracking you can set disabled: true
when intializing the Telemetry
object. Then you can continue to call the methods on your instance of Telemetry
without throwing exceptions or logging errors.
FAQs
A JavaScript Implementation of the ArcGIS Telemetry Specification
The npm package @esri/telemetry receives a total of 709 weekly downloads. As such, @esri/telemetry popularity was classified as not popular.
We found that @esri/telemetry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 44 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.