linusmelb / ga-protocol Goto Github PK
View Code? Open in Web Editor NEWJavascript Wrapper of Google Analytics Measurement Protocol to easily send pageview and events to GA
License: MIT License
Javascript Wrapper of Google Analytics Measurement Protocol to easily send pageview and events to GA
License: MIT License
Might worth trying to utilise the endpoint provided by google to validate the payload.
Reference:
https://developers.google.com/analytics/devguenides/collection/protocol/v1/validating-hits
Error message:
TypeError: adapter is not a function. (In 'adapter(config)', 'adapter' is undefined)
To define an adapter in uni-app:
axios.defaults.adapter = function(config) {
return new Promise((resolve, reject) => {
console.log(config)
var settle = require('axios/lib/core/settle');
var buildURL = require('axios/lib/helpers/buildURL');
uni.request({
method: config.method.toUpperCase(),
url: config.baseURL + buildURL(config.url, config.params, config.paramsSerializer),
header: config.headers,
data: config.data,
dataType: config.dataType,
responseType: config.responseType,
sslVerify: config.sslVerify,
complete: function complete(response) {
response = {
data: response.data,
status: response.statusCode,
errMsg: response.errMsg,
header: response.header,
config: config
};
settle(resolve, reject, response);
}
})
})
}
Describe the bug
One of npm dependency urlcat
utilises urlSearchParams object which not supported by node versions that below 10
To Reproduce
Use urlSearchParams in Node versions below 10
Expected behavior
Regardless of urlSearchParams object is not defined, we should be able to switch to normal way to construct urls.
Solution
Remove urlcat library and define our own method to construct url
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.