I want to be able to provide a URL to a task that embeds the tracking code rather than the submission key (default). Is this possible?
You can use following pattern to do so.
If you want to generate this URL in groovy (server side) then you can use following method as well -
com.avoka.fc.core.util.PortalUtils.getFormDataServletUrl(Portal portal, boolean htmlForm)
That class has several other methods to get other URLs as well if you are interested in.
hope this helps.