Howdy Laurie,
That snippet actually should work both for the desktop and smartphone. It does not matter what device you are viewing from, if there is a URL in “Event URL” field for an event, then clicking on a link to that event anywhere from the customer side of your site should link to the Event URL, not the event itself. Are you experiencing something different? If so can you describe what that is, and possible link to the page in question. Or maybe I misunderstood your question.
Let me know how I can help. Cheers!
– Brook