@hebcal/rest-api
    Preparing search index...

    Function appendIsraelAndTracking

    • Adjusts a Hebcal.com event link for Israel/Diaspora and appends UTM tracking parameters. For www.hebcal.com holiday/sedrot/omer links, this also sets i=on when il is true, rewrites the host to the shorter hebcal.com and shortens the path (see shortenSedrotUrl() for sedrot), and uses the abbreviated us/um/uc parameter names instead of the full utm_source/utm_medium/utm_campaign (the us/um params are omitted when utmCampaign starts with 'ical-' or 'pdf-', since those campaigns are tracked by uc alone). For all other URLs, the standard utm_source/utm_medium/utm_campaign parameters are appended, and utm_source defaults to 'hebcal.com' when not otherwise specified.

      Parameters

      • url: string

        the event URL to rewrite

      • il: boolean

        true to mark the link as using the Israel holiday schedule

      • OptionalutmSource: string

        tracking source, e.g. 'js'

      • OptionalutmMedium: string

        tracking medium, e.g. 'api'

      • OptionalutmCampaign: string

        tracking campaign, e.g. 'ical-foo'

      Returns string

      the rewritten URL as a string