Get data from other events on the timeline in fullcalendar - fullcalendar

I'm trying to do a scheduler where I can drag and drop events from a table in fullcalendar. I have some restriction, for example a type A event can't go 2 hours or less after a type B event.
So I assume that i need to get the information of the "before and after" events on the schedule point that I'm trying to drop the event, but i have no idea how to do that.
Is there a way to get a list with that data? Is there a way to get the cell where we are attepmting to drop the event?
Thank you!

Related

Can we display Count of Events in a calendar day in Full Calendar

We are using Full Calendar Js and CSS. Requirement is to display the count of events instead of the event description on the calendar day. Is there a way we can do that?
In full Calendar there is a method to get all events in a calendar
calendar.getEvents() -> Array
which returns an array of all events stored in client side memory.
then you simply have to iterate through the array and look for events that overlap your target day.
Here are links to the documentation for the method
https://fullcalendar.io/docs/Calendar-getEvents
https://fullcalendar.io/docs/event-parsing

Create a segment using a custom event in Google Analytics

I want to create a segment of users which counts something like total [upgrade] events > 50. The upgrade event is a custom category in this case. How can I pass this event through to be used in segmentation?
I have tried using Event Category matches [upgrade], but that only counts players who have done one or more event in this category. I want to segment based on the number of times a user completes an event in this category.
Thanks for any insight you can lend. We're stumped over here!

Track click data as % with google analytics

I have a new feature which is exposed to some visitors to my website, depending on what they search for.
I want to know "if the feature is exposed to them, how many interact with it", ideally as a percentage.
I use GTM / GA but not sure how to get this relativity.. any ideas on how I could do it? Thanks
You can track this in many ways a simpler one would be to use an event. If you want it with visualization you can create an event based goal where the destination goal could be the event of interaction.
When an user is exposed with the new feature then fire an event. Configure this as an required event for the goal and destination event could be the interaction one.
After you get all the event counts then you can manipulate the data as you want.
I think the step you are missing is the detection of the elements on page. To do this create a Custom JavaScript variable (lets call it 'Detect'):
function(){
return $('#FILTER_ID).length>0
}
This function looks for whether an element with the id FILTER_ID is present on page, and returns true or false.
From here you have a number of options.
1: Create an event on page-view if Detect equals true. Create an additional event for clicks on the element. Divide clicks events by pageview events and you have your interaction ratio.
2: Create a new hit level custom dimension. In your Pageview Tag, set this custom dimension to the value - Detect. Create an event for clicks on the element. Create a session segment where Detect equals true, then divide events by pageviews and you have your interaction ratio.

Show only Months with Events In them?

Would there be a way to limit the next/prev buttons to only show months with events registered in them? We have courses that fill up and I don't want users to have to fast forward through blank months where there is no availability of events. I'm also including holiday events from the basic google public holidays calendar and don't want to include those events.
As long as I know, this option does not exist in FullCalendar yet.
If you are retrieving events month by month:
You can bind fullcalendar's Next and Previous events to a new function. Inside this function, get the events and if there is no events, your function must call Next or Previous again.
If you are retrieving all events at once
You can bind fullcalendar's Next and Previous events to a new function. Inside this function, get all the events and look for the first date out of the current month. Set fullcalendar's current date for that month and refresh it.

Determine which day event is on when event is selected in fullcalendar

When an event is clicked, is there any way to determine which date this event falls on? Im running into this issue when dealing with events that span multiple days, and since the event only contains a start and end date, I have not found any way to ascertain which date of the multi-day event was selected.
You can pass additional fields into your JSON object when you bind up your events.
For example, I pass in a "leave" parameter that tells me whether an event is an appointment or a part of the day off.

Resources