javascriptgoogle-analyticsanalytics.js

How to add search engines like _addOrganic in new analytics.js API?


for my new site I am using new analytics.js (as suggested by Google instead of ga.js). Works fine, except I don't see any keywords set in Google Analytics used in Google search by my visitors.

Seems strange to me as I would expect, that Google Analytics would recognize it's own search engine by default.

So I have tried to search for a way how to add new organic search in JS on my site as it was possible with ga.js _addOrganic function. But I have found nothing, there is no mention about this possibility for new analytics.js.

Can anybody give me some hints ? Thanks in advance.


Solution

  • This is no longer set in the code but via the admin interface. Go to ->admin->tracking info->organic search sources (see screenshot).

    enter image description here