Posts tagged with ads

I have a Facebook base code for lead tracking installed in my React app. All I want to do is to add fbq('track', 'Lead'); to my "Thankyou.jsx" component.

All examples I have seen used NextJs but I'm writing just React and Redux.

How do I add fbq('track', 'Lead'); in the react component where I want it to reside?

I am trying to add googletags multiple times on the page. In some places on the page ads are displayed correctly and in some places, I see the box as shown in the attached screenshot.

Code sample:

const slot = googletag.defineSlot(   options.addUnit,   options.sizes,   options.containerId, )?.addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); // Disable initial load. googletag.pubads().disableInitialLoad(); // Start ad fetching googletag.enableServices(); googletag.pubads().refresh([slot]); 

The above code is called multiple times with some different slot level targeting parameters like 'pos'.

In total, I am calling it 8 times on the page and 4 times div elements are injected dynamically in the page. Sometimes I see one generic box sometimes two or at times 3, this behavior is random. See the second screenshot after I refresh the page.

I'm new to google ads and need to apply conversion tracking to a form submission on my site. The site offers translation in two locales (en, de). I've created two marketing campaigns for corresponding regions. So far I've integrated the english ad conversion into my site and tested it with the google tag assistant, which works. I am having two question:

  1. Google ads seems to track the ad campaign's id on my site. How does it know, if someone who submitted a form, truly clicked on the ad? Does the ad click send info to the site that "this visitor came here by clicking on this ad"? Does this function handle it?

     gtag('event', 'conversion', {      'send_to': "id...",      'event_callback': callback  }); 
  2. How does google ads know, wether the visitor comes from the en ad or the de ad? I am thinking about triggering the corresponding conversion id depending on the locale of the visitor but this would exclude for example german visitors with en language set in their browser and would count them as conversions of the en campaign.

How do you handle this case?

The folk ad Google have been nagging me to include 'enhanced conversion data' for sales on the website. This entails passing over to google personal information about the person who placed the order (email, name, address).

This seems like a privacy no-no. I'm in the UK so GDPR law applies, but regardless it seems like shady behaviour to pass these details on to another company without consent. Is it compliant with GDPR law?

Also, what's in it for me? Google say it makes the conversion tracking more accurate, but they would, wouldn't they?

I would like to know, why these errors and how to solve them, when I use flutter run, flutter returns these errors:

Launching lib\main.dart on BISON in debug mode... Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 Warning: Mapping new ns http://schemas.android.com/repository/android/generic/02 to old ns http://schemas.android.com/repository/android/generic/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/addon2/02 to old ns http://schemas.android.com/sdk/android/repo/addon2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/repository2/02 to old ns http://schemas.android.com/sdk/android/repo/repository2/01 Warning: Mapping new ns http://schemas.android.com/sdk/android/repo/sys-img2/02 to old ns http://schemas.android.com/sdk/android/repo/sys-img2/01 Formato de par�metros incorreto - Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\path_provider_android-2.0.9\android\src\main\java\io\flutter\plugins\pathprovider\PathProviderPlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. e: C:/Users/Arthur Alland/.gradle/caches/transforms-2/files-2.1/ae449724a6ca38888aadaf690b25af94/work-runtime-2.7.0-api.jar!/META-INF/work-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version  is 1.1.15. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugKotlin'. > Compilation error. See log for more details * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 6m 1s Running Gradle task 'assembleDebug'...                            365,1s Exception: Gradle task assembleDebug failed with exit code 1 

Android Build Gradle

buildscript {     ext.kotlin_version = '1.3.50'     repositories {                                  google()                  jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:4.1.0'         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"     } } allprojects {     repositories {         google()         jcenter()      } } rootProject.buildDir = '../build' subprojects {     project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects {     project.evaluationDependsOn(':app') } task clean(type: Delete) {     delete rootProject.buildDir } 

Gradle Wrapper Properties

distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip 

Android Manifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.example.you_plan">     <!-- io.flutter.app.FlutterApplication is an android.app.Application that          calls FlutterMain.startInitialization(this); in its onCreate method.          In most cases you can leave this as-is, but you if you want to provide          additional functionality it is fine to subclass or reimplement          FlutterApplication and put your custom class here. -->     <application         android:name="io.flutter.app.FlutterApplication"         android:label="you_plan"         android:icon="@mipmap/ic_launcher">         <activity                      android:name=".MainActivity"                          android:launchMode="singleTop"             android:theme="@style/LaunchTheme"             android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"             android:hardwareAccelerated="true"             android:windowSoftInputMode="adjustResize">             <!-- Specifies an Android theme to apply to this Activity as soon as                  the Android process has started. This theme is visible to the user                  while the Flutter UI initializes. After that, this theme continues                  to determine the Window background behind the Flutter UI. -->                           <meta-data               android:name="io.flutter.embedding.android.NormalTheme"               android:resource="@style/NormalTheme"               />             <!-- Displays an Android View that continues showing the launch screen                  Drawable until Flutter paints its first frame, then this splash                  screen fades out. A splash screen is useful to avoid any visual                  gap between the end of Android's launch screen and the painting of                  Flutter's first frame. -->             <meta-data               android:name="io.flutter.embedding.android.SplashScreenDrawable"               android:resource="@drawable/launch_background"               />                         <intent-filter>                 <action android:name="android.intent.action.MAIN"/>                 <category android:name="android.intent.category.LAUNCHER"/>             </intent-filter>         </activity>         <!-- Don't delete the meta-data below.              This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->         <meta-data             android:name="flutterEmbedding"             android:value="2" />               <meta-data     android:name="com.google.android.gms.ads.APPLICATION_ID"     android:value="ca-app-pub-3940256099942544~3347511713"/>     </application> </manifest>

I googled it several times and the problem seems to be with these android files, but I don't have much experience with android