Run this script to provide your Analytics Cloud account and your Liferay Portal with some fake data.
We use this script in Tango product team just for developing purposes of our Content Performance Tool, which renders metrics from AC.
- Clone/fork this repo
- Install dependencies:
npm i
oryarn
- Run a Liferay Portal
- Configure AC in your instance settings and visit a page
- Open your browser network tool, usually inside the browser's dev tools, you should find a request to AC:
- Use this request url to configure the endpoint property
- Use this request payload to extract the data you want to use in the request.
- Open
ac-config.js
file and change the needed values:
{
"endpoint": "https://osbasahpublisher-ac-asahuat.lfr.cloud/",
"projectId": "asah0878884185e94d299b56779700af5d43",
"page": {
"title": "Home - Liferay",
"url": "http://liferay.local:8080"
}
}
- In
payload.js
modify the data you need
Run the script: npm run generate
or yarn generate
.
By default, the script generates 50 visits per each domain in referrers.js
. This setting can be override from the command line just passing the value, ie. for generate 400 visits per domain:
npm run generate 400
or yarn generate 400
A bunch of 200 codes should appear in node console, also an empty array in each request indicates no errors.