I think this line needs to be within the `if` (at least until there's an `else`)

How about using no vars again ;-). eg:
```
if(/Article|Video|Gallery/.test(config.page.contentType)) {
  return new History().log({
    id: config.page.shortUrl.replace('http://gu.com', ''),
    meta: {
      section: config.page.section,
      keywords: config.page.keywordIds.split(',')
    }
  })
}