denoland/deno_blog

Missing await in ga middleware

Ko1103 opened this issue · 2 comments

I'm using this deno_blog with ga middleware, but Google Analytics not working.
I think I found the cause, it is missing await in this line.

gaReporter(request, ctx.connInfo, res!, start, err);

Reproduce

Here's my main.ts file.

import blog, { ga, redirects } from "blog";

blog({
   ...
  middlewares: [
    // If you want to set up Google Analytics, paste your GA key here.
    ga("G-XXXXXXXXXX"),
  ],
});
rojvv commented

How do you know if it is not working?

Ko1103 commented

@roj1512 Sorry, I totally misunderstood about Server Side GA tag, I've not finished setup yet. So this is my problem.
Sorry again..