PlasmoHQ / plasmo

🧩 The Browser Extension Framework
https://www.plasmo.com
MIT License
8.91k stars 318 forks source link

[BUG] Extension was rejected by Google due to the Google Analytic code. #877

Open aiddroid opened 6 months ago

aiddroid commented 6 months ago

What happened?

Violation: The Manifest V3 product contains remote code.

.plasmo/cache/remote-code/e3b1320b18219fdb.js:
(function(a){function b(){m=F.documentElement.getAttribute("data-tag-assistant-present");Tt(m)&&
(l=h.Uj)}if(!E["__TAGGY_INSTALLED"]){var c=!1;if(F.referrer){var d=qh(F.referrer);c="cct.google"===kh(d,"host")}
if(!c){var e=sj("googTaggyReferrer");c=e.length&&e[0].length}c&&
(E["__TAGGY_INSTALLED"]=!0,Xb("https://cct.google/taggy/agent.js"))}if(Je)a();
else{var f=function(u){var v="GTM",w="GTM";De?(v="OGT",w="GTAG"):Je&&(w=v="OPT");
var x=E["google.tagmanager.debugui2.queue"];x||(x=[],

https://cct.google/taggy/agent.js

image

Version

Latest

What OS are you seeing the problem on?

No response

What browsers are you seeing the problem on?

No response

Relevant log output

No response

(OPTIONAL) Contribution

Code of Conduct

glucn commented 5 months ago

I run into this same issue the other day, and had to switch to using GA Measurement (ref: https://github.com/PlasmoHQ/examples/tree/main/with-google-analytics-measurement)

I don't know if Plasmo will be able to fix this, since the remote code is actually loaded by the JS from GA. But regardlessly, I think some comments/documents should be added about this, including: