I am working with Google calendar recurring events. I created a recurring event and by using GData library, in response i get the the perimeters "COUNT", "FREQ" , "UNTIL" etc... where COUNT=5.
The problem is, when I delete an instance from this recurring event(total instance are 5 in this case), 4 instances are left in google calendar. but in response COUNT is still 5, it should be 4 now. Also in response i am not getting any details about that deleted instance.
Can any one help me in this regards.
I am very thankful in advance!!!
waiting for your reply!
This is working as intended. If the count indeed changed that would mean that the last instance should not be there anymore. While you could have deleted the second instance. In the v3 API the deletion of the second instance will be represented by an event with status=cancelled and "recurringEventId" + "originalStartTime" set to point to that specific instance.
There is a handy instances() call if you want to see all the instances of a recurring event.
Related
We only want to show our live chat tag Monday to Friday, from 09.00 until 17.00. Is this possible with Google Tag Manager please?
Thanks!
Preferred solution
The best solution is probably to get the current date on the server side and push to the datalayer a variable that determines whether the chat tag should be triggered or not depending on this date.
Alternative
The alternative is to retrieve the date on the client side which won't be 100% reliable. In order to use this solution, you need to create a Custom Javascript variable with the following code (replace "America/New_York" by your business' timezone) :
function (){
const currentDate = new Date(new Date().toLocaleString("en-US", {timeZone: "America/New_York"}));
const day = currentDate.getDay()
const hours = currentDate.getHours()
return day > 0 && day < 6 && hours >= 9 && hours < 17
}
Then, trigger your chat tag only when this variable's value is "true".
If you want to get a consistent, reliable date, ListenLayer.com returns a timestamp with every data dataLayer push. The time can appear in a single account timezone based on your account settings, so if you align your ListenLayer timezone to your chat time zone it will work.
You can then write rules in the platform to determine if the time returned should allow for chat. You will output a yes/no into a new data layer variable based on the rule. Then you will register this variable in GTM and use it to determine if the chat tag should fire.
Here is the process I would use at a high level
Create an account and set the account time to match your chat timezone
Turn on the User Source Listener and all it's features,
enable it to push on every page load This will push the user's traffic source into the data layer, along with a bunch of other structured data on each page load. You could use another listener, but this one will allow us to ensure it pushes on every page load (container load) so that GTM will know on every page load whether to trigger the chat script.
Create a custom data layer variable called chatTime. We will write a rule in ListenLayer to push a yes or a no into this variable based on the time that is returned in the userSource data layer event. This will happen in real time, in the same event in the data layer.
Publish everything in listenlayer and then go to your website with the console open (the data layer is written there for ease). You'll see the userSource dataLayer event in the console on every page load. It will contain an eventTimestamp. You want the data that is inside the listenlayerAccountTime node because it will match your ListenLayer timezone, which should match the timezone you operate your chat hours from (or if all of this is based on the user's time zone, use that one to be localized to them). You will need to focus on these two variables that are automatically provided because we will write a rule based on them in step 5:
sourceAutomaticValues.eventTimestamp.listenlayerAccountTime.time.timeOfDay
sourceAutomaticValues.eventTimestamp.listenlayerAccountTime.time.dayOfWeek
Here is a visual showing those variables I have given a path to above. One of the day of the week and one is the time of day.
Inside ListenLayer, under the User Source listener you will create two rules, they will be lookup table rules. The first rule will run first, then the second. If a match is found, they will stop. This means we can write the first rule to basically just look at the day of the week and set chatTime to no if the value is Sat or Sun. The second rule will then focus on the time of the day since this rule will only be reached if it is not Saturday or Sunday. In this rule we will look at the first part of the timeOfDay variable using simple ReGex. Our rule has 24 rows for each hour of the day and will return a yes only for the hours you are open for chat. Certainly this rule could be made simpler with some additional regex, but this gives a better illustration. There is an import export so you could spin up the 24 row rule in a csv file and import it.
After you save and publish this simple logic, your website will have a value in the data layer telling google tag manager whether chat should be on. It will appear in the data layer every time the userSource event is pushed, which is every page load.
I assume things are easy from here. You would create a data layer variable inside GTM referencing sourceCustomValues.chatTime You'll also create a custom event trigger referencing userSource and only firing if chatTime = yes. Then you will set your chat tag to fire on this trigger.
I'm trying to use custom log event to have some statistics of the use of my app.
Events are properly configured and can be seen in the "Stream view" of firebase analytics.
my problem is that i want to display statistics no for only the last 30min.
for exemple if i log an event "car" which contain the property model, which can have the value 'tesla', 'ford' etc... as this :
this.defaultAnalytics.logEvent("car", {model: "tesla"});
I'm able to see in the last 30min like 75% of car.model are tesla in the stream view, but i'm not able to see this for the last week for exemple.
I can only see that the event 'car' has been emit 100 times in the last week but i can't see anything about the value of the property.
I'm i obliged to use a tool as bigquery ?
It depends which charts you want to get, but in general - you don't have to use BigQuery. You can see all your custom event parameters in Firebase console, but you have to register them first:
You can also identify up to 100 custom event parameters per project (50 numeric and 50 text) to include in reporting by registering those parameters with their corresponding events. Once you register your custom parameters, Google Analytics for Firebase displays a corresponding data card in each related event-detail report.
Situation is next one:
I created several tiles. Every tile need to show count of records.
Tile "Expired Active Contracts" always shows zero.
There is created simple query with data source table Contract. Ranges are added (ContractStatus; Value: 2) and (ValidTo; Value: (LessThanDate(0)) )
When it's clicked on tile, it opens valid form with valid record, where contracts status is active (2) and ValidTo are any date before today's date, but count doesn't working.
Tried to recreate, tried several things but definitely nothing. ValidTo field is date field.
Some time ago I had a mistake very similar to yours in my dev environment, this steps help me to fix the error.
1 - Clear Usages Data.
2 - SysAdmin/Setup/Data cache/Tile data cache configuration. Select
the tiles which are running into this issue and then delete the
selected tiles.
3- In VS rebuilt and Synchronized the Solution.
4 - Finally refresh the Application browser.
Another thing is that a while ago there was a problem for tiles refresh
Issue 243278 Workspace tile does not update correctly when reusing the
same name
https://fix.lcs.dynamics.com/Issue/Details?bugId=243278&dbType=3&qc=68b6dc6804c9cea218daa102968c7acfcdfe6a990e80e0b5ec66b920a680fceb
I hope you find it useful
I need to create a segment that needs conditions such as:
Sign up event occurred
Login event occurred
Event with action 'Test' occured 3 times
However, I could not find any way to do this. There is a condition called "Total events", but it seems to apply for all types of events not for a specific one.
Is there any way of doing this? Thanks in advance.
What is the proper way to update all (or a subset) of the instances of a recurring event? Also related: how do you, given the id of the original event, get the instances of that event?
If you want to update just a subset of recurring events, then you need to set singleevents = true when running your query to retrieve the initial list of events. In PHP you'd do something like this
$gdataCal = new Zend_Gdata_Calendar($client);
$query = $gdataCal->newEventQuery();
$query->setUser('default');
$query->setVisibility('private');
$query->setProjection('full');
$query->setOrderby('starttime');
$query->setStartMin($startDate);
$query->setStartMax($endDate);
$query->setSingleEvents('true'); //get recurring events as a series of single events
$eventFeed = $gdataCal->getCalendarEventFeed($query);
foreach ($eventFeed as $event) {
//do stuff with $event
}
I tried with updating all recurrence event ,it is working.Initially I created one Recurring event like weekly on Monday from 2016-02-25 to 2016-03 25 and It is created 6 instances for that recurring period.During updating what I tried is,
1.First I assigned to Recurrence field ,
"recurrence":["RRULE:FREQ=WEEKLY;COUNT=18;BYDAY=TU"] (Updating like weekly on Tuesday)
2.after that I fetching available lists using list google api.here I used Single Events: false(in the sence it will give only main recurring event not all instances)
3.after I used update event to update like passing auth,eventId and calendarId: "primary" and resource:updated event array
then it is done .It is updating the instances as Weekly on Tuesday.
I hope it will help to someone.
To update all you just change the relevant properties for the event, leaving the recurrence and recurrence exceptions strings intact. Not sure that you can easily modify a subset, as this would require converting the recurring event into multiple new events depending on the subset.
For the second part or your question, according to the API docs:
Specifically, each recurring event is
represented by a
element in the result feed, and each
of those elements includes a
element for each occurrence of that
event that falls between the start
time and the end time. Looking at
elements is much simpler
than parsing recurrences and
exceptions yourself.
However, I've never been able to find that magic "when"... so I've ended up parsing the recurrence and recurrenceexceptions strings - if you find the answer to that one, let us all know!
For anyone with this issue I also spent some time trying to figure this out. Basically when you get your CalendarEventEntry list you need to check for each calendarEventEntry if it has an originalEvent (calendarEventEntry.getOriginalEvent()). This basically tells you there is another event (which you may or may not have already processed) that needs to swapped with the information for this current calendarEventEntry.