Is it possible to add an event directly to a user's calendar (be it google, iCal, Outlook) with AS3? I work at a major network and my boss wants to add this functionality to our Flash banners to help promote our TV shows. The best I can think of is having a button that links out to a .ics file the the user downloads and adds manually, but I'd like to avoid having the user do anything other than click on a button.
Any advice/direction is much appreciated. Thanks!
You would need to develop some kind of mediator that takes your request and then translates it into platform specific API calls (if any exist). For example, you would need to use the Google Calendar API to add events directly into a Google Calendar.
Related
I work on a one single page application (360 virtual visit) with Angular 11. I would like to track user events and especially on buttons.
I started to put the Global site tag in my Index.html file like this: Global Site tag in Index.html
On google analytic, I receive connection data user First Data User
But I have no idea how I can track bouton click with Angular.
Does anyone have an idea that works today ?
do not hesitate to ask me questions for more information. :D
Thank you in advance for your answers. I would share my progress.
For something like Button Clicks, you have to configure custom events in Google Analytics and push that custom event whenever user clicks the button.
You can create onButtonClick() function and call it when user clicks the button. In the function, you should push event to the window.dataLayer:
onButtonClick() {
window.dataLayer.push({
event: 'button_click',
data: {
user: this.current_user._id,
... // Send some custom data that you want to track
}
})
}
You should be careful with SPA when you install gtag the way it is described into docs as it will track page views incorrect. In SPA browser loads the page only once, and all other actions will rerender the content but it still will not be counted as a views.
Instead you will need to set up router events. Here is a great tutorial for that. It also will explain how to set up other events like button clicks.
By the way in the example above they suggest to send user id with event. Instead of it you may send it with config only once, and it will be automatically added to any your event:
gtag('config', 'GA-ID', {
page_path: event.urlAfterRedirects,
user_id: this.user.id
});
You need to configure the Google tag manager to send events to Google Analytics. I've written a post about it: https://pieterjandeclippel.medium.com/angular-or-react-or-whatever-and-google-analytics-97342c909e61
Now it seems that Universal analytics will be on its way out, so you might want to try GA4 instead.
But I haven't tried with that one yet, since my own website has been configured to use UA.
We've added the same feature recently and this guide here, albeit a bit dated, explains it quite well.
It boils down to you using a dedicated GoogleAnalyticsService that enables you track specific events (ie. button clicks, scroll events, etc).
Is it possible to create an action to trigger a function whenever the user is composing an email?
I am hoping to add an extra button to the UI for composing emails which will insert some text into the email based on the subject and recipients of the email. Looking through the gmail addon docs I can't seem to find a way to do this.
Would this be something better suited as an actual chrome extension instead?
In short : No
For now , you can not add buttons or any other controls inside the Gmail UI. The add on does not do that. And moreover addons cannot listen into GmailUI except for triggering themselves. Thus we cannot know if the user had started typing into the compose window. It is better to create chrome extensions instead, for these kind of tasks.
Note: Gmail addons are at a nascent state. Probably, we might receive these event handlers at a later stage.
How can a Chrome extension alter the Google Calendar event editing UI?
I see that, for example, the Moxtra extension has managed to inject UI including a button just below the location. According to their YouTube video they added a button to fill out the event description although when I installed Moxtra this no longer seems to work.
Stepping back from this a bit, it occurs to me that editing the Google Calendar page seems like something that could easily get messed up by future changes to Google Calendar. Perhaps it is better to edit the event description from the extension's own UI? If so, how can that be done?
Thanks.
It can be done with content scripts and modification of the DOM.
They probably check Event edit page for specific selectors and try to insert their own elements in the page, if they found it.
So, if UI of Google Calendar will change, extensions like Moxtra will be probably also broken.
You are right about the edit of the description - it's safer. But you still need to get a description field and change a content of it. There is no 100% safe way to do it and don't break on the change of UI.
In an attempt to automate some web/browser tasks with golang I reached a barrier when if comes comes to click, touch and swipe interaction.
Thanks to the amazing https://github.com/PuerkitoBio/goquery library I am able to parse webpages and I am able to interact with form sheets.
One integral part that is missing to automate pates is simulating mouse clicks that trigger javascript.
How would it be possible to implement this in golang? Do I need to simulate OS level mouse clicks or do browsers have an API that I can use?
You would need to use something like Selenium's WebDriver which has at least one go client
I would like to create a button that will allow my users to subscribe to a Calendar link. But, I want it to work for Google Calendars and also for the native Apple/iOS Calendars. Google Calendars subscription links don't seem to work reliably on iOS devices (at least in my first few tests). Google Calendar will sync to iCloud calendars, but they update REALLY slowly (every 24 hours or so). That's not terrible, but it's not great either.
Anyone have a good solution here? Maybe finding a way to sync a Google Calendar with an iCloud calendar and then offering two different links?
I don't believe there is a way to have a one-link solution. Here are the two links that allow you to subscribe to a Google Calendar using either Apple Calendar or Google Calendar.
Subscribing to a Google calendar with Apple Calendar. This following link will ask if you want to open your calendar application on your Mac, then allow you to subscribe (including choosing how often you want the calendar to refresh). For iOS devices, you need to press and hold the link for some reason, then a dialog box asks if you want to open the calendar application (I was using an older iPad, so YMMV).
"webcal://calendar.google.com/calendar/ical/{YOUR_GCAL_ID}/public/basic.ics"
Subscribing to a Google calendar with Google Calendar. This link will take you to your Google calendar and ask if you want to subscribe to it. I also found that with the iOS device I was using, I needed to press and hold the link and "Open in New Tab" for it to work for some reason.
"https://calendar.google.com/calendar/render?cid=https://calendar.google.com/calendar/ical/{YOUR_GCAL_ID}/public/basic.ics"
Of course, the calendar needs to be set to public for these to work (sharing within a company would likely allow for the second link to work with the correct settings).