Apple has simple manual for web developers how to make Smart App Banner. It looks like this:
Over past years I was collecting different custom implementations from all over the web. You will be surprised how creative some developers are.
And still it remains secret to me why would anyone wants custom solution for this problem? Is this blunt ignorance or might be it is designers who think their design is better than standard solution? Or perhaps it’s greed and website owner wants have more tracking? Anyway, this custom banners look worth and don’t work well. They have worth privacy as well, so don’t tap on them.