Skip to content

[firebase_analytics]: Analytics does not sends any events from iframe #12877

Closed
@NickNevzorov

Description

@NickNevzorov

Is there an existing issue for this?

  • I have searched the existing issues.

Which plugins are affected?

Analytics

Which platforms are affected?

Web

Description

Standard code (from example):

  try {

    await Firebase.initializeApp(options: firebaseOptions);
    analytics = FirebaseAnalytics.instance;
    observer = FirebaseAnalyticsObserver(analytics: analytics!);
    await analytics?.logEvent(name: 'initialize_app', parameters: {
      'app_name': appName.toLowerCase(),
      'app_version': appVersion.toLowerCase(),
      'app_platform': getPlatformName(),
    } );

  } catch (e) {
    print('initFirebaseAnalytics: ' + e.toString());
  }

If app running from direct address, all working. If app running in iframe tag, analytics does not sends any events (and no errors reported)

Reproducing the issue

http://webshop.vsgroup.ua/ - full version
http://webshop.vsgroup.ua/test.html - iframe tag

Firebase Core version

2.32.0

Flutter Version

3.22.01

Relevant Log Output

No response

Flutter dependencies

No response

Additional context and comments

No response

Metadata

Metadata

Assignees

Labels

Needs AttentionThis issue needs maintainer attention.platform: webIssues / PRs which are specifically for web.plugin: analyticsresolution: fixedA fix has been merged or is pending merge from a PR.type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions