Posts under category Google

Suddenly We are experiencing crashes when loading Ads from Google Ads SDK. The crash is coming on Android 9 running devices and having latest chrome version.87.0.4280.101

Ad SDK used:

implementation 'com.google.android.gms:play-services-ads-lite:19.6.0' 

The crash is only reported on the Google play console and not on Firebase Crashlytics.

This seems to be an issue of webview which is used internally by Google Ad SDK.

Anybody else is getting the same crashes recently..

Logs attached.

2020-12-12 10:42:35.79221819-21819/? A/DEBUG: Build fingerprint: 'xiaomi/lavender/lavender:9/PKQ1.180904.001/V10.3.5.0.PFGINXM:user/release-keys' 2020-12-12 10:42:35.79221819-21819/? A/DEBUG: Revision: '0' 2020-12-12 10:42:35.79221819-21819/? A/DEBUG: ABI: 'arm64' 2020-12-12 10:42:35.79221819-21819/? A/DEBUG: pid: 21385, tid: 21549, name: ThreadPoolForeg  >>> com.indiamart.m <<< 2020-12-12 10:42:35.79221819-21819/? A/DEBUG: signal 5 (SIGTRAP), code -6 (SI_TKILL), fault addr -------- 2020-12-12 10:42:35.79221819-21819/? A/DEBUG: Abort message: '[FATAL:jni_android.cc(249)] Please include Java exception stack in crash report     ' 2020-12-12 10:42:35.79221819-21819/? A/DEBUG:     x0  0000000000000000  x1  0000000000000081  x2  000000007fffffff  x3  0000000000000000 2020-12-12 10:42:35.79221819-21819/? A/DEBUG:     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  7f7f7f7fffff7f7f 2020-12-12 10:42:35.79221819-21819/? A/DEBUG:     x8  0000000000000000  x9  0000000000000000  x10 0000000000000001  x11 0000000000000000 2020-12-12 10:42:35.79221819-21819/? A/DEBUG:     x12 00000000ffffff80  x13 ffffffffffffffff  x14 ffffffffff000000  x15 ffffffffffffffff 2020-12-12 10:42:35.79321819-21819/? A/DEBUG:     x16 0000007737c11218  x17 0000007737b21450  x18 0000000000000010  x19 0000007685e06c98 2020-12-12 10:42:35.79321819-21819/? A/DEBUG:     x20 0000007685e06cb0  x21 0000007685e06ca8  x22 000000000000004f  x23 0000007737c133c0 2020-12-12 10:42:35.79321819-21819/? A/DEBUG:     x24 00000076a20c8000  x25 0000007685e07588  x26 0000000000000000  x27 0000007685e067e8 2020-12-12 10:42:35.79321819-21819/? A/DEBUG:     x28 0000000000000000  x29 0000007685e06c30 2020-12-12 10:42:35.79321819-21819/? A/DEBUG:     sp  0000007685e067d0  lr  000000769f8dd854  pc  000000769f8dda34 2020-12-12 10:42:35.81421819-21819/? A/DEBUG: backtrace: 2020-12-12 10:42:35.81521819-21819/? A/DEBUG:     #00 pc 0000000001ab6a34  /data/app/com.android.chrome-SDEgJLhE8mN6xW_77wZdEQ==/base.apk (offset 0xd27000) 

I am trying to do the pagination with google-ads-php at the bottom of my page in php, so I get through my ads, like PREVIOUS 1,2,3 NEXT So this is my code:

    public function runExample(GoogleAdsClient $googleAdsClient, int $customerId){         $googleAdsServiceClient = $googleAdsClient->getGoogleAdsServiceClient();         // Creates a query that retrieves all ads.         $query = "SELECT campaign.name, ad_group.name, "             . "ad_group_ad.ad.responsive_display_ad.marketing_images, "             . "ad_group_ad.ad.app_ad.images, ad_group_ad.ad.app_ad.youtube_videos, "             . "ad_group_ad.ad.responsive_display_ad.youtube_videos, ad_group_ad.ad.local_ad.videos, "             . "ad_group_ad.ad.video_responsive_ad.videos, ad_group_ad.ad.video_ad.media_file,  "             . "ad_group_ad.ad.app_engagement_ad.images, ad_group_ad.ad.app_engagement_ad.videos, "             . "ad_group_ad.ad.display_upload_ad.media_bundle, ad_group_ad.ad.gmail_ad.product_images, "             . "ad_group_ad.ad.gmail_ad.product_videos, ad_group_ad.ad.gmail_ad.teaser.logo_image, "             . "ad_group_ad.ad.image_ad.image_url, ad_group_ad.ad.legacy_responsive_display_ad.square_marketing_image, "             . "ad_group_ad.ad.local_ad.marketing_images, ad_group_ad.ad.responsive_display_ad.logo_images, "             . "ad_group_ad.ad.responsive_display_ad.square_logo_images, "             . "ad_group_ad.ad.responsive_display_ad.square_marketing_images, "             . "ad_group_ad.ad.responsive_display_ad.youtube_videos, "             . "metrics.impressions, campaign.campaign_budget, campaign.status, "             . "campaign.start_date, campaign.end_date, metrics.all_conversions, "             . "metrics.average_cost, ad_group_ad.ad.type, ad_group_ad.ad.id, "             . "campaign.campaign_budget, metrics.cost_micros, ad_group_ad.status, metrics.impressions "             . "FROM ad_group_ad "             . "WHERE segments.date >= '{$this->from}' AND segments.date <= '{$this->to}' "             . "ORDER BY campaign.name ASC";         // Issues a search stream request.         /** @var GoogleAdsServerStreamDecorator $stream */         $stream = $googleAdsServiceClient->search($customerId, $query, ['pageSize' => 10]);         $ads = [];         foreach ($stream->iterateAllElements() as $googleAdsRow) {             dump($googleAdsRow->serializeToJsonString());             /** @var GoogleAdsRow $googleAdsRow */             $ads[] = json_decode($googleAdsRow->serializeToJsonString(), true);         } 

As you see the pageSize is set to 10, so it will be 23 pages, because I have 230 ads.

How can I do the pagination, now the $stream returns all ads in one response. How can return only 10 ads, and then when user click for example second page button, it will return the next 10 ads, and so on?

Thanks in advance!

I implemented a custom script in tankyou page in my woocommerce store to track google ads conversions. This is my implementation:

add_action( "woocommerce_thankyou", "pixel_analytics_conversion_track_script", 20 ); if ( ! function_exists( 'pixel_analytics_conversion_track_script' ) ) {     function pixel_analytics_conversion_track_script($order_id){         if ( $order_id > 0 ) {             $order = wc_get_order( $order_id );             if ( $order instanceof WC_Order ) {                 $order_id               = $order->get_id(); // order id                 $order_key              = $order->get_order_key(); // order key                 $order_total            = $order->get_total(); // order total                 $order_currency         = $order->get_currency(); // order currency                 $order_payment_method   = $order->get_payment_method(); // order payment method                 $order_shipping_country = $order->get_shipping_country(); // order shipping country                 $order_billing_country  = $order->get_billing_country(); // order billing country                 $order_status           = $order->get_status(); // order status                 ?>                 <script type="text/javascript">                     jQuery(document).ready(function( $ ){                         console.log('PURCHACE EVENT');                         /* Track conversion on facebook Pixel */                         fbq('track', 'Purchase',                         {                             value: <?php echo $order_total ?>,                             currency: "<?php echo $order_currency ?>"                         });                                              /* Track conversion on Google Ads */                         gtag('event', 'conversion',                          {                              'send_to': 'AW-693771414/0MhwCMa9rLYBEJa56MoC',                              'value': <?php echo $order_total ?>,                              'currency': "<?php echo $order_currency ?>",                              'transaction_id': "<?php echo $order_id ?>"                         });                     });                 </script>                 <?php             }         }     } } 

The code works very well but some data is not precise and I think that probably the code above duplicates conversion if user goes to thank you page twice. We have an order confirmation email that has a link to the thankyou page of woocommerce.

As you can see Im sending the transaction_id parameter, so my question:

If the user loads twice or N times the thank you page the conversion will appear dupplicated in Google ads even if you send the transaction_id parameter?

Has anyone put a Google ad conversion tag on a WooCommerce order confirmation page?

We have our website on Wordpress, use WooCommerce for our ordering and use a Divi Theme.

I tried doing this with one webmaster and we weren't able to get it to work. We tried putting the tag on the order confirmation page and couldn't get it to work.

Now, I have a new webmaster. I set up the conversion tag in Google ads and emailed it to her. She said she used a plug in to set it up on the page. She said she viewed the page, but I'm still seeing it labeled as inactive in Google ads.

Don't know why we're having such problems? What's the trick?

I'm not very familiar with Wordpress. Seems like this should be worked out or other people should also be having this problem.

PHP was suggested as a tag for this question, so I thought I would add it.

Thanks,