ifi parameter for AdSense/Doubleclick Fast Fetch should index from 1 and not increment due to other networks
Two issues need to be addressed:
-
ifi is currently using data-amp-slot-index parameter set in amp-ad.js which indexes from 0 while we expect it to index from 1 (see https://github.com/ampproject/amphtml/blob/master/extensions/amp-ad/0.1/amp-ad.js#L75)
-
given data-amp-slot-index is shared across all amp-ad elements, it is incremented when a different type is encountered. Instead a separate counter should be maintained per impl.
/cc @ampproject/a4a
So we need a separate counter per impl, and the counter should start at 1--and that should satisfy this issue?
That'll do it
Are AdSense and DoubleClick supposed to share a counter? That was why I originally did it that way in the first place, because we wanted them to do that.