The Direct link is a URL that simply directs users to your own custom landing page for your widget, hosted at https://sync.ecal.com. The direct link has a few mandatory querystring parameters as well as a long list of additional parameters you can pass via the querystring to impact the widget’s user experience.
Use Direct Links for your email communications, social media and native apps.
ECAL apiKey and widgetId are required as parameters in the link. For e.g.
Include user’s email (if available) in the link as it allows the widget to automatically detect whether the user has an existing subscription to your ECAL account and simplifies the User experience.
Please consult ECAL support for details about which parameters are relevant to your use case via chat in your ECAL Admin or email@example.com.
Example HTML code
<a href=" https://sync.ecal.com/button/v1/ecal.html?apiKey=INSERT_YOUR_API_KEY&widgetId=INSERT_YOUR_WIDGET_ID&email=INSERT_USER_EMAIL&calendar_reference=AAdvantage-Aviator,Barclaycard-Visa ">Sync to Calendar</a>
|apiKey||String||YES||The apiKey provided by ECAL and is found under Developers > API Keys menu in ECAL Admin.|
|widgetId||String||YES||A unique string provided by ECAL to identify the widget. Note this can also be passed to the Button via the HTML attribute data-widget-id|
|String||NO||Same as email for init()|
|category||String||NO||Used to define when only Calendars from one or more specific categories are displayed. Format is array of category paths.|
|calendarIds||Array [String]||NO||Only show a particular calendar based on its ID, when specified, the category option will be ignored|
|calendar_reference||Array [String]||NO||Array of Strings. Only show Calendars (Schedules) with a reference present in this array. Calendar.reference can be set via the ECAL Admin or API.|
|mobileNumber||String||NO||Mobile phone number, including its international country code|
|shareUrl||String||NO||The URL for sharing on social networks|
|referringPage||String||NO||A useful string for tracking and analytical purpose|
|doubleClickParameters||Object||NO||DoubleClick ad parameters|
|autoSubscribe||Boolean||NO||If true, widget will skip the schedule selection page so that user is subscribing to whatever schedules (CalendarIDs) have been passed to the widget.|
|skip_schedule_selection||Boolean||NO||Set as true if you need Users to be able to Subscribe without selecting a Schedule.|
|subscriber_reference||String||NO||Used to pass an internal reference for user subscribing to ECAL, especially in the private event use cases.|
The following demonstrates a basic usage of the ECAL Button Link passing an array of calendar_reference to identify which Schedules should be displayed to the user to choose from.