Google Analytics node: Loop, iterate through records and then change start-date, end-date

Hello together,

I am using Google analytics query to populate the dataset. I managed to pass the startIndex and loop until all records are loaded. I did that using the Generic loop start and variable condition loop end to stop once the number of rows equals zero. 

But now I ran into the issue that the Google Analytics API is sampling the data if I select a whole month. 

I managed to set up the date generator and with a time shift node I am creating some time ranges. These are passed over as flow variables to the Google Analytics node. I put this in a recursive loop but it works just for one iteration and stops with the message "Errors overwriting node settings with flow variables: Unknown variable "start-date"".

In general I know what I'd like to do: The loop shall iterate with the current date set until the reply from the Google Analytics node is zero rows and then switch to the next date set (until the end). But how can I do that? Or is there an even easier way to solve it?

Any help would be greatly appreciated.

Thanks a lot.

Hi Andy,

the problem is the following. The recursive loop start outputs what ever you insert into the loop end in the next iteration. The column start-date is generate by the time generator and is translated into a variable by node 63.

At the end you pass the result of the ga query to the loop end. That's why the table row to variable does not get the column start-date and the ga node fails. 

I would use two loops. The outside loop is a Table row to variable loop start(before 57) and a loop end(after 58), which only loop over the times. The inside can nearly stay as it is. I assume you are calculating the next index based on the currentiteration variable?

I hope this was helpful.

Best regards, Iris 

Thanks a lot. :slight_smile:
This was helpful!

Hi Andy,,


did you solve this problem , i would like to create a loop to donwload dalily the data from GA .

Let me konw if you were able to manage.