deconf / Analytics-Insights

GNU General Public License v2.0
5 stars 7 forks source link

Most UA4 projects don't show up in dropdown #3

Closed milesgilmour closed 2 years ago

milesgilmour commented 2 years ago

I have a GA account that has a mix of UA and GA4 accounts, I can see all the UA properties, but only a few of the GA4 accounts are visible. They all have a web stream set up - is there some other requirement for using GA4 properties?

deconf commented 2 years ago

At least one webstream per property is needed. Have you checked the Analytics Insights -> Errors & Debug -> Plugin Settings tab and see how many properties are displayed there?

milesgilmour commented 2 years ago

I see three properties listed in the ga4_webstreams_list array, missing quite a few that have a webstream.

I have an Analytics login that has 85 accounts, and all the UA properties show up, but only three GA4 sites are listed. I can't see what is different between those and the ones that do not show. I created a new GA4 property last week and another today with a web stream (all default settings) and they don't show.

deconf commented 2 years ago

Please note that you need to clear authorization and reauthorize to refresh the list. For security reasons (like the lock profile feature and other use cases), the list is only one pulled at authorization.

milesgilmour commented 2 years ago

I've tried that, clearing the cache and have even uninstalled / reinstalled the plugin but it's not showing GA4 properties apart from a random three.

deconf commented 2 years ago

It may be related to the 50 accounts default list limit. I won't be able to test it, but on next update I can increase the limit to the maximum without paging, which is 200.

If you want to test it, on:

https://github.com/deconf/Analytics-Insights/blob/631952128d2f9c5aa151ad533f7a83e24d5d5327/tools/gapi.php#L397

Replace:

$this->service_ga4->accountSummaries->listAccountSummaries()->getAccountSummaries()

With

$this->service_ga4->accountSummaries->listAccountSummaries( array( "pageSize" => 200 ) )->getAccountSummaries()

deconf commented 2 years ago

This was fixed on recent releases

milesgilmour commented 2 years ago

I see three properties listed in the ga4_webstreams_list array, missing quite a few that have a webstream.

I have an Analytics login that has 85 accounts, and all the UA properties show up, but only three GA4 sites are listed. I can't see what is different between those and the ones that do not show. I created a new GA4 property last week and another today with a web stream (all default settings) and they don't show.

On Tue, 3 May 2022 at 11:20, Alin Marcu @.***> wrote:

At least on webstream per property is the only requirement. Have you checked the Analytics Insights -> Errors & Debug -> Plugin Settings tab and see how many properties are displayed there?

— Reply to this email directly, view it on GitHub https://github.com/deconf/Analytics-Insights/issues/3#issuecomment-1115944209, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYPNUALZAKBHGY4CS3QUF3VID4YPANCNFSM5U6NYVKA . You are receiving this because you authored the thread.Message ID: @.***>

--

deconf commented 2 years ago

After all, how many webstreams do you have? I will have a look again over the code, what I can tell you for sure is that in a lot smaller Google account, with about 6 analytics accounts and 10 webstreams, all webstreams are listed.

deconf commented 2 years ago

One more question, do the webstreams listed belong to same account or is their a pattern they follow reported to their accounts?