Skip to content

Analytics on homepage? #80

@j-f1

Description

@j-f1

Attempting to GET the / endpoint yields Please include a path to a page. on the client and:

Error: Please include a path to a page.
    at createError (/app/node_modules/micro/lib/server.js:152:15)
    at analyticsHandler (/app/node_modules/micro-analytics-cli/src/handler.js:58:11)
    at /app/node_modules/micro-analytics-cli/src/handler.js:109:16
    at resolve (/app/node_modules/micro/lib/server.js:24:34)
    at Promise._execute (/app/node_modules/bluebird/js/release/debuggability.js:300:9)
    at Promise._resolveFromExecutor (/app/node_modules/bluebird/js/release/promise.js:483:18)
    at new Promise (/app/node_modules/bluebird/js/release/promise.js:79:10)
    at Function.exports.run (/app/node_modules/micro/lib/server.js:24:3)
    at Server.server (/app/node_modules/micro/lib/server.js:13:50)
    at emitTwo (events.js:126:13)
    at Server.emit (events.js:214:7)
    at parserOnIncoming (_http_server.js:602:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)

in the server logs. Is there any way to track events at the root page?

For example, running fetch(`https://my-micro.analytics/${location.pathname}`) doesn’t record visits to the homepage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions