问题
From what I understand, setting a dimension:
ga('set', 'dimension1', 'value');
requires sending the dimension afterwards using:
ga('send', 'pageview');
My problem is that the header file with all my ga codes (including send pageview) loads before the file where I have my dimension. So if I send it again, won't I get two pageviews registered? Is there a way to do an empty send with ga and just send whatever has been set before it, nothing more?
来源:https://stackoverflow.com/questions/41544246/sending-ga-dimension-without-including-a-pageview